Twitter status API suddenly returning error '3

2019-05-25 04:33发布

I have a script that gets the top 3 tweets from my feed. This was working just fine but now it is returning the following error in the JSON:

{"errors":[{"message":"Sorry, that page does not exist","code":34}]}

Twitter describes this as a classic 404 not found error, but I do not see any disruption from the API status' on the Twitter website.

Has something changed in the way we now fetch Tweets?

My code:

$.getJSON('http://twitter.com/statuses/user_timeline.json?screen_name=' + user + '&count=3&include_rts=true&callback=?', function(data) { });

Thanks.

5条回答
何必那么认真
2楼-- · 2019-05-25 05:17

You're using the wrong link, https://api.twitter.com/1/statuses/user_timeline/jbrooksuk.json

Try this:

$.getJSON('http://api.twitter.com/1/statuses/user_timeline/' + user + '.json?count=3&include_rts=true&callback=?', function(data) { });
查看更多
3楼-- · 2019-05-25 05:18

Thanks James! This saved not only the day, but much more!

I already implemented https://api.twitter.com/1.1/statuses/
so the March 2013 update is already in place.

Vincent

YEL - Your Emotions Live

查看更多
霸刀☆藐视天下
4楼-- · 2019-05-25 05:25

I also found my Twitter feeds had stopped working today. It is the same problem for the links to RSS feeds.

This was working yesterday:

'http://twitter.com/statuses/user_timeline.rss?screen_name='.$screenName.'&count='.$limit;

but now the URL has to be:

'http://api.twitter.com/1/statuses/user_timeline.rss?screen_name='.$screenName.'&count='.$limit;
查看更多
我想做一个坏孩纸
5楼-- · 2019-05-25 05:25

Same thing happend to me for no reason. Nothing like coming back to some untouched code only to have it broken. +1 for the answer. THX

查看更多
做个烂人
6楼-- · 2019-05-25 05:32

« If you're using any kind of "unversioned" endpoint, you'll need to move to a versioned one. Version 1 of the API is still active until March 2013. It's "version zero" of the API that is finally being removed now. »

https://dev.twitter.com/discussions/10803

https://dev.twitter.com/discussions/11551

查看更多
登录 后发表回答