How to get twitter feed from twitter API 1.1

淺唱寂寞╮ 提交于 2020-01-04 09:14:10

问题


I have two online banner (flash and HTML5) using twitter feed when API 1.0 . We know that API 1.0 can get the feed by a URL directly. (Just like: http://api.twitter.com/1/statuses/user_timeline/annrubin.json?count=3)

How can I get the feed like XML format? Because flash banner is difficult to use HTML code.


回答1:


You need to upgrade to the 1.1 version of the API. It's been plastered all over the API docs for months that the 1.0 API (the one you're currently using) is being removed.

Also, the twitter API no longer returns XML format. They made the good decision to return all data in JSON. From the FAQ:

API v1.1 will support JSON only. We’ve been hinting at this for some time now, first dropping XML support on the Streaming API and more recently on the trends API. XML, Atom, and RSS are infrequently used today, and we’ve chosen to throw our support behind the JSON format shared across the platform. Consequently, we’ve decided to discontinue support for these other formats.

You can't make client-side (JS / jQuery / AJAX) requests to the twitter API any more as of 11th June 2013. You need to pick up a server-side language to make authenticated requests (if you choose PHP, check this link).



来源:https://stackoverflow.com/questions/17166727/how-to-get-twitter-feed-from-twitter-api-1-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!