Earlier on I described a work around to enable you to view your Tweets in Lifestream.
This workaround was not a great solution and so I set about hacking the extension.inc.php code in the extensions/twitter folder of Lifestream.
I remembered reading a retweet by mubix who had outlined how Twitter and HTC had resolved their Peep issue when Twitter defaulted to OAuth authentication back in September 2010.
What the Tweet outlines is that by adding ?source=twitterandroid to the end of your Twitter request you are not forced to use OAuth and can continue to use the basic authentication i.e sending your username and password upon each request.
So adding
.'&source=twitterandroid'
to the end of line 72
return $url_base . '/statuses/user_timeline/'.$this->get_option('username').'.rss?page='.$page.'&count='.$count;
to give me
return $url_base . '/statuses/user_timeline/'.$this->get_option('username').'.rss?page='.$page.'&count='.$count.'&source=twitterandroid';
With the changes saved I inputted my credentials into my Lifestream plugin and hey presto tweets are now showing in my stream.
[…] Twitter for Lifestream Fix. Earlier on I described a work around to enable you to view your Tweets in Lifestream. This […]
I’ve tried it but I still have the same problem. When trying to add a twitter stream to lifestream I have this error now:
Failed to open url: http://twitter.com/statuses/user_timeline/c_oriach.rss?page=1&count=20&source=twitterandroid (cURL error 6: Couldn’t resolve host ‘twitter.com’)
which is almost the same I had before:
Failed to open url: http://twitter.com/statuses/user_timeline/c_oriach.rss?page=1&count=20 (cURL error 6: Couldn’t resolve host ‘twitter.com’)
Any idea? cURL is enabled, of course.
It sounds like your server cannot reach twitter.
try putting www. in front of twitter.com on line 70 of the extension:
$url_base = 'http://twitter.com';
would become:
$url_base = 'http://www.twitter.com';
If that fails and you have shell access to your server try pinging twitter.com to see if you get a response.
Thank you for the fix. I tried it and adding ‘www’ to line 70 (just in case) and it worked! Thank you very much!
really thx guy!!!!!!!!!! =)
Great fix. Thank-you.
[…] more: RobMcGhee.com – Twitter for Lifestream Fix Tags: lifestream, plugins, […]
[…] can get all the details on his post here. SharePosts you might likeVideo Presentation of Lifestreaming with DrupalLifestream.fm Relaunches […]
Thanks – works great! See lifestream on http://eastersealspei.org landing page.
Having issues with [lifestream] display on page itself though – probably theme / plugin incompatibility – http://eastersealspei.org/2011-campaign/
This fixed my Lifestream Twitter feed. Thanks!
[…] The biggest issue is that Twitter doesn’t work anymore, because they require OAuth now and the plugin doesn’t support it. Luckily, there is a loophole… apparently Twitter left in a non-OAuth backdoor to authentication for clients that identify themselves as Android phones. All you have to do is change a line of code; and the Twitter for the Lifestream is working again! The instructions are on Rob McGhee’s blog. […]
Hi, I have also tried it, but doesnt work. Still have “Could not authenticate you”.
Do you have any idea?
Where do you put – .’&source=twitterandroid’
Both example lines are the same.
Ohhh…OK, just seen that the line actually extends. Didn’t see that at first. (FF3.6)
Feel free to delete this…but whilst I’m here and the lifestream forum is dead, when I ‘refresh feeds’ my lifestream theme goes to boxy from default. How can I stop this? I’ve even deleted the boxy folder! Cheers, Ben.
[…] a lifestream option on their author page such as created with the Lifestream for WordPress (see the fix for the latest version) which can be customized to bring in streams from a variety of sites and social media services to a […]
[…] with dozens of social media and networking sites. It should be updated soon, but until then, see this easy temporary fix for the […]
I’m now getting a new error:
There were errors with your request:
Error fetching feed from http://jeremysarber:CstM1tt0NB6ofl@www.twitter.com/statuses/user_timeline/jeremysarber.rss?page=1&count=20&source=twitterandroid (A feed could not be found at )….
Basic authentication is not supported
Thoughts?
hi! for some reason it won’t work for me.
someone can help me please?
thanks
@Jeremy @Yekarum: as read on https://github.com/dcramer/wp-lifestream/issues/68, it is really (f**king) simple: just don’t supply a password and it’ll work. N00b we are (including me): a RSS Feed doesn’t need a password to be read 😉
@ Christophe Zlobinski-Furmaniak
Holy Crap… Thanks. Took me 3 hours of searching to find your single comment, problem solved.
Hi
How to fix the facebook feed?
Everytime I feed from my facebook page ? seems its not working.
Refer this link as twitter changed its authentication mode.Its worked for me to get twitter.
Link:- https://github.com/dcramer/wp-lifestream/commit/8b48bc2468f778e481db5339b8aa497188668850
I fixed my twitter feed by replacing code for
$url_base = ‘http://api.twitter.com’;
}
return $url_base . ‘/1/statuses/user_timeline.rss?screen_name=’.$this->get_option(‘username’);