I'm using the twitter API, but when I post links they are showing up as text and not links. I haven't been able to find the documentation showing how to post a link that actually works.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you don't keep the prefix (http://) and just post something like www.google.com, the link won't be picked up.
回答2:
If the URL contains special characters you need encode it before posting to Twitter so it will be converted to a link:
from urllib import quote
url = quote(url)