2016-09-24 25 views
1

我最近提交了我的申請以供審覈,並且看到我現在擁有基本許可並且我的客戶狀態爲生效。但是現在我沒有收到任何數據。我得到這個錯誤: 「此客戶尚未被批准訪問此資源。」Instagram api上線後不工作

我需要改變什麼?在提交我的申請以供審覈之前,我收到了正確的數據。我只是想要接收哈希標籤數據。

這就是我如何調用api來獲取令牌。

https://api.instagram.com/oauth/authorize/?client_id="+clientId+"&redirect_uri="+redirect_uri+"&response_type=code 

這是我的令牌後得到的數據:

$.ajax({ 
     url: 'https://api.instagram.com/v1/tags/'+hashtag+'/media/recent', 
     dataType: 'jsonp', 
     type: 'GET', 
     data: {access_token: token, count: num_photos}, 
     success: function(data){ 
      var images = data.data; 
      $('.slider ul.images').append('<li><img src="'+images[count].images.standard_resolution.url+'"></li>'); 

      setTimeout(function(){ 
       startSlider(); 
      }, 5000); 
     }, 
     error: function(data){ 
      console.log(data); 
     } 
}); 

回答

1

如果你只有basic許可,您無法訪問主題標籤API,與basic你只能得到你的照片。

https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN 

要獲得主題標籤API和其他人從其他人發佈帖子,您需要public_content權限。如果沒有,您將在API響應中獲得This client has not been approved to access this resource

+0

我能在Instagram審查我的應用程序之前獲得public_content。有沒有辦法回去? –

+0

是否確定嗎?在沙箱模式下? – krisrak

+0

審查前我能夠得到我的照片。但沒有基本的訪問,我沒有得到任何照片,甚至沒有我自己的照片。儘管我對該標籤有很多照片,但我仍然不斷收到該錯誤。 –