问题
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