Twitter status API suddenly returning error '34'

安稳与你 提交于 2020-01-02 13:30:12

问题


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.


回答1:


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) { });



回答2:


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;



回答3:


« 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




回答4:


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




回答5:


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



来源:https://stackoverflow.com/questions/12837319/twitter-status-api-suddenly-returning-error-34

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!