2011-03-20 83 views
0

这是我如何创建登录按钮(photo_upload许可):FB API没有返回相册

<fb:login-button autologoutlink="true" perms="publish_stream, offline_access, photo_upload, share_item"></fb:login-button> 

然后,我调用下面的函数来检索专辑:

function getAlbum() 
{ 
    console.log("retrieving the albums"); 
    FB.api('/me/albums', function(response){ 
     console.log(response); 
    }); 

    return true; 
} 

但响应对象如下:

Object 
Data: Array[0] 
    length: 0 

我有2个公共相册,但我无法检索它们w以上代码。有人可以告诉我我做错了什么。

在此先感谢:)

+0

'photo_upload,share_item'你从哪儿得到这些? – ifaour 2011-03-20 12:12:27

+0

这里:http://developers.facebook.com/docs/reference/fbml/prompt-permission/ – saiy2k 2011-03-24 14:03:12

+0

这是一个古老的资源,随时查询最新的! – ifaour 2011-03-25 10:01:29

回答

2

找到解决方案。问题是我错过了'user_photos'权限。 现在,一切工作正常:)