开发者

Real Time Twitter Status

开发者 https://www.devze.com 2022-12-13 12:50 出处:网络
I\'m looking to write a Twitter application, and I need to get real time (or as close as possible) updates. The official REST API only allows 100 calls/hour or so, and if I want to get status from mor

I'm looking to write a Twitter application, and I need to get real time (or as close as possible) updates. The official REST API only allows 100 calls/hour or so, and if I want to get status from more that just a couple users it's going to add up pretty fast. Besides, requesting every 开发者_运维问答30 seconds seems like an overall pretty inefficient and inelegant solution. The Twitter<->Facebook app seems to have near-realtime updates, though of course they may be using prive backend things. Does anyone know what accessor method (REST/RSS/etc) would be best for this?


Twitter provides a streaming API for this sort of usage (statuses/filter). Some levels of access require approval.


Twitter's streaming API will be opened up to everyone in early 2010 but it may not meet your needs. For one thing it only includes public tweets, so if you want to show someone their own feed the streaming API won't work. Also it's a heck of a lot of data for you to process.

Depending on your needs, a better alternative is to apply for getting your app white listed:

  1. Log in to the Twitter account you will be using to test your app
  2. Go to Twitter's whitelisting page and submit your app.

Within a few days Twitter will most likely approve your app. This allows you to have much larger numbers of API calls from that one account. Once you're ready to deploy your app to a server, go in again and ask them to whitelist the IP address(es) of your server, so your server can make lots of calls for any Twitter account, not just yours.

0

精彩评论

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

关注公众号