How to post links with the twitter API?
I'm using the twitter API, but when I post links they ar开发者_如何学运维e 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.
If you don't keep the prefix (http://) and just post something like www.google.com, the link won't be picked up.
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)
精彩评论