2013-06-12 45 views
1

加載鳴叫時出現問題。我想加載推特前。來自「BachelorGDM」。 (https://twitter.com/BachelorGDM
加載twitter鳴叫410錯誤

這是我在我的JavaScript文件做:

var url = 'https://api.twitter.com/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); 
} 

當我嘗試這個,我得到這個錯誤:

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

奇怪的是,這個工作yesterdag :/
我已經嘗試加載來自其他用戶的推文,但相同的迴應。

有人知道我在做什麼錯嗎?

回答

2

Twitter停止支持他們的API v1,並轉移到V1.1。這個版本有一個額外的安全層(公共賬戶也需要這個)。如果您使用PHP,this tutorial將幫助您再次顯示推文。