0
这里的朋友的信息是一些测试代码:不能检索使用Facebook的图形API
<script>
var movieList = new Array();
var friendList=" ";
var friendCount = 0;
function get_friend_likes() {
FB.api('/me/friends', function(response) {
friendCount = response.data.length;
for(i=0; i<response.data.length; i++) {
friendId = response.data[i].id;
friendList=friendList+(response.data[i].name)+'<br/>';//store names
FB.api('/'+friendId+'/movies', function(result) {
movieList = movieList.concat(result.data); //fetch data to the pool
friendCount--;
document.getElementById('test').innerHTML = friendCount
+ " friends to go ... ";
});//end_FB.api
} //end_for
});//end_FB.api
}
</script>
的问题是:我可以用外FB.api呼叫得到朋友的名字和IDS成功,但我可以在内部FB.api调用中不会获得/电影信息。返回的数据是空的。 关于这方面的任何见解?非常感谢!!
是的,我忘了在我的登录代码“friends_likes”。怎么哑.. – xiaolong 2012-04-08 20:27:10