[twitter-dev] Optimizing Twitter Calls

2010-11-10 Thread mage26
I am currently integrating Twitter with a small social network. I am
using PHP and the twitteroauth library.  The idea is that a user can
sync their account to their Twitter. So when they post on their wall,
it will send a tweet and it will post their tweets onto their wall.
Currently, I am gathering user tweets via a PHP script run by cron
that runs like this:

1. go through every user that has connected to their twitter account
2. pull the last 20 tweets for each user.
3. See if any of these tweets are new. If so, deposit into database.

My worry is that we make a call to Twitter for each user connected and
we'll quickly hit our rate limit, even if we get whitelisted. Is there
a more streamlined way to gather people's tweets?

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Optimizing Twitter Calls

2010-11-10 Thread yaemog Dodigo
On Wed, Nov 10, 2010 at 11:08 AM, mage26 mag...@gmail.com wrote:

 I am currently integrating Twitter with a small social network. I am
 using PHP and the twitteroauth library.  The idea is that a user can
 sync their account to their Twitter. So when they post on their wall,
 it will send a tweet and it will post their tweets onto their wall.
 Currently, I am gathering user tweets via a PHP script run by cron
 that runs like this:

 1. go through every user that has connected to their twitter account
 2. pull the last 20 tweets for each user.
 3. See if any of these tweets are new. If so, deposit into database.


You could easily replace this by using the streaming API. No rate limiting
no cron job, just works.
--d

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk