我對使用任何形式的FQL都很陌生,抱歉,如果這是一個簡單的問題,但我似乎無法解決它。FQL Javascript訪問令牌
我有這樣的代碼,正嘗試獲取好友列表:
var query = FB.Data.query('SELECT '+response.id+', '+response.name+' FROM friendlist from user where uid=' + response.id);
但響應我不斷收到的回覆是
「一個積極的訪問令牌必須用於查詢有關信息當前用戶。」
當我拉回來從響應對象/我詢問我看到我的所有信息,如位置,姓名,工作等,但我沒有看到任何標記訪問
的代碼開始像這個:
window.fbAsyncInit = function() {
FB.init({appId: '12...0', status: true, cookie: true, xfbml: true});
/* All the events registered */
FB.Event.subscribe('auth.login', function(response) {
// do something with response
login();
});
FB.Event.subscribe('auth.logout', function(response) {
// do something with response
logout();
});
FB.getLoginStatus(function(response) {
if (response.session) {
// logged in and connected user, someone you know
login();
}
});
我該如何獲取訪問令牌並提供FQL查詢?
感謝您的任何建議提前!
謝謝你的好評! – 2011-01-29 23:58:54