Inigo Posted November 18, 2010 Share Posted November 18, 2010 Hello guys, I've been reading through various threads here about getting latest tweets with php but they're all basically methods I've seen before, and involve getting the tweets from the atom feed xml. I've been experimenting with various code snippets that do this on my site, and most of the time they work. But about one in every 10 times it doesn't, because for some reason the tweet doesn't appear in the atom feed. I guess this is a problem with Twitter, but I've google this, and to be honest there's only a few whispers from people that could be experiencing something like this problem, which makes me wonder whether I'm just unlucky or being stupid and overlooking something..? I don't see what though. Anyway I know there's methods where you can actually log into your twitter acount and post tweets, and all the rest of it, but the codes I've found are all extremely lengthy and arcane, and do far more than what I want them to. So what I'm wondering is- has anyone used this foolproof method of retrieving tweets, and if so I wonder is you could share your code with me, or point me in the right direction? All I want to do is get my latest tweet and display it on my site. Many Thanks Quote Link to comment Share on other sites More sharing options...
tomfmason Posted November 18, 2010 Share Posted November 18, 2010 I haven't done any work with the twitter api in php but I have worked rather extensively with the api in python and have ran across the same problem. The solution for me was to simply choose a different format - in my case json. See - http://dev.twitter.com/doc/get/statuses/user_timeline It should return the latest 20 tweets. Quote Link to comment Share on other sites More sharing options...
Inigo Posted November 18, 2010 Author Share Posted November 18, 2010 Nice one Tom, thanks, I'll try that. And it's reassuring to hear that you've also encountered this problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.