这是我的代码,它只在应用程序开发者帐户上运行良好。 WT 是我的错吗?
window.fbAsyncInit = function() {
var APP_ID = 'XXXXX';
var PAGE_ID = 'XXXXX';
FB.init({
appId : APP_ID,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
});
FB.api('/me/likes/' + PAGE_ID, function(response) {
t = $.toJSON(response);
alert(t);
});
结果
开发者账号:
{"data":[{"name":"111222333","category":"Small business","id":"281428705206834","created_time":"2011-09-02T14:14:37+0000"}]}
非开发者账户:
{"error":{"type":"OAuthException","message":"An active access token must be used to query information about the current user."}}
最佳答案
这可能与页面设置有关。如果该页面设置为不可见,例如仅对该页面的管理员可见,这可能是您收到该错误的原因。
您是否已将您的页面设置为对所有人可用?
关于javascript - 如何通过 Graph API 和 Javascript-SDK 从 iframe 应用程序检查喜欢的粉丝页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7293905/