0
我有一些代碼在一個月前工作...現在,當我檢查它時,它不起作用。我看到了什麼問題,控制檯說:「意外結束查詢」(#601)解析器錯誤:意外的查詢結束 - Javascript FB.api
我已經檢查Graph API工具上的這個查詢,它的工作原理!我使用與我的「應用程序」相同的權限。
這是FQL查詢:
SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name
這是完整的代碼:
// This code is in an html file
window.fbAsyncInit = function() {
FB.init({
appId : '226472757418610',
status : true,
cookie : true,
oauth : true,
xfbml : true
});
}
...
// this code is in a javascript file and the user is correctly logged in
FB.api('/fql?q=SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name', function(amigos) {
console.log(amigos)
// it prints the message above
});
我看不到任何錯誤!你能建議我的代碼有什麼問題嗎?
可能你或許可以解釋明白爲什麼這「不是最佳解決方案「?一種形式是否優先於其他形式? – 2013-02-06 18:36:26