开发者

Twitter Api: get tweets with links

开发者 https://www.devze.com 2023-03-18 02:46 出处:网络
I\'m building a website on which tweets from a certain user should be displayed. I know how to display the tweets using the user_timeline function from the twitter api, but these tweets are raw text t

I'm building a website on which tweets from a certain user should be displayed. I know how to display the tweets using the user_timeline function from the twitter api, but these tweets are raw text tweets. Is there also a method to 开发者_C百科get the tweets in html with all the links already there? I couldn't find one myself but perhaps you do know one.


You need to use Tweet Entities. See the Twitter API documentation for more information.

https://dev.twitter.com/docs/tweet-entities


Use this helper function by Dustin Diaz to make a tweet fetched programmatically to look as it would on Twitter.

Update: Here is a complete code sample that makes use of the above function.

0

精彩评论

暂无评论...
验证码 换一张
取 消