Twitter friends again!

Jul 15, 2008 17:30

Update 12/2009: Mentions and retweets are excluded from the friends_timeline.rss.   Nowadays, it's better to join the mentions.rss feed with the home_timeline.rss.

Remember how angry I was at twitter? They turned off open friends feeds subscription since the WWDC?

It turns out the solution I needed was a one-liner cron job.

curl -u email:password Read more... )

code, web

Leave a comment

Comments 8

davidd July 16 2008, 01:17:41 UTC
I really wish I had some clue as to what all this stuff means. Okay, I know it's "code" but, like, what do you do with the line of code? Where do you even go to paste this in to make things work ( ... )

Reply


zannah July 31 2008, 18:44:31 UTC
How often does that have to run? Once a day?

Reply

dblume July 31 2008, 19:00:58 UTC
I run it hourly.

Remember that I'm dealing with two delays. The rate at which my cron job runs, and the rate at which Google Reader checks the public feed I created. (You may not have to deal with worrying about the second one.)

Here are my best case and worst case scenarios:

Best Case
A friend tweets at 12:59
My cron job picks it up at 13:00 and writes it out.
Google check the public feed at 13:01, and I see it!

A delay of a minute or two. Yay!

Worst Case
A friend tweets at 13:01, just after my job checked.
My cron job checks at 14:00 and writes it out.
Google miss by minute or two, and gets it next time, at 15:01.

A delay of a couple of hours. Drat.

For an enterprise application, you'd want to check more frequently with conditional GETs and honor any HTTP 304 replies, probably.

Reply

dblume August 5 2008, 22:29:29 UTC
You can accomplish the same with without needing a cron job by using Yahoo Pipes, too. Here's how.

Reply


doh. anonymous January 21 2009, 21:45:12 UTC
Doh. That *is* simple. Thanks.

Reply


Surely this is only a local solution.. anonymous June 14 2009, 11:31:27 UTC
It seems a good idea when you are on your own Linux box but what if you are away from your pc???

Reply


Worst case could be better? anonymous August 24 2009, 12:42:19 UTC
Quote:
"Worst Case
A friend tweets at 13:01, just after my job checked.
My cron job checks at 14:00 and writes it out.
Google miss by minute or two, and gets it next time, at 15:01."
Sorry if there's some reason why this wouldn't work- I'm a student and hobbyist coder but I'm not familiar with the twitter API.
Couldn't you just run your cron job at every XX:50, so that google reader can't miss it? Then your worst case is only a 1 hour delay.

Reply

Re: Worst case could be better? dblume August 24 2009, 20:27:45 UTC
I have no control over when my friend tweets, nor when Google Reader gets around to reading my feed. If I change my cron job to work at XX:50, the odds are that Google Reader will start reading my feed just before I update it, at XX:49, ensuring the worst case is still the worst case.

Reply


Leave a comment

Up