javascript - Loading twitter tweets 410 error - Stack Overflow

I'm having problems loading tweets. I want to load the tweets for ex. from "BachelorGDM"

I'm having problems loading tweets. I want to load the tweets for ex. from "BachelorGDM". ()

This is what I do in my javascript file:

var url = '.json?callback=twitterCallback2&count=4';

var script = document.createElement('script');  
    script.setAttribute('src', url);
    document.body.appendChild(script);

function twitterCallback(tweets)
{
    console.log(tweets);
}

When I try this I get this error:

GET .json?callback=twitterCallback2&count=4 410 (Gone)

The strange thing is that this worked yesterdag :/
I already tried loading tweets from another user but same response.

Does somebody know what I'm doing wrong?

I'm having problems loading tweets. I want to load the tweets for ex. from "BachelorGDM". (https://twitter./BachelorGDM)

This is what I do in my javascript file:

var url = 'https://api.twitter./1/statuses/user_timeline/BachelorGDM.json?callback=twitterCallback2&count=4';

var script = document.createElement('script');  
    script.setAttribute('src', url);
    document.body.appendChild(script);

function twitterCallback(tweets)
{
    console.log(tweets);
}

When I try this I get this error:

GET https://api.twitter./1/statuses/user_timeline/BachelorGDM.json?callback=twitterCallback2&count=4 410 (Gone)

The strange thing is that this worked yesterdag :/
I already tried loading tweets from another user but same response.

Does somebody know what I'm doing wrong?

Share Improve this question asked Jun 12, 2013 at 11:50 nielsvnielsv 6,83035 gold badges117 silver badges219 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

If you open your url in browser, it says:

The Twitter REST API v1 will soon stop functioning. Please migrate to API v1.1. https://dev.twitter./docs/api/1.1/overview.

So, you need to use newer version.

Twitter stopped suppoting their API v1, and moved on to V1.1. This version has an extra layer of security (which is also needed for public accounts). If you're using PHP, this tutorial will help you to display tweets again.

To use the newer version I found this tutorial: http://www.webdevdoor./php/authenticating-twitter-feed-timeline-oauth/

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745537814a4631986.html

相关推荐

  • javascript - Loading twitter tweets 410 error - Stack Overflow

    I'm having problems loading tweets. I want to load the tweets for ex. from "BachelorGDM"

    21小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信