开发者

FB API not returning albums

开发者 https://www.devze.com 2023-02-17 18:05 出处:网络
This is how I create the login Button (with photo_upload permission): <fb:login-button autologoutlink=\"true\" perms=\"publish_stream, offline_access, photo_upload, share_item\"></fb:login-b

This is how I create the login Button (with photo_upload permission):

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

Then, I call the following function to retrieve the albums:

fu开发者_JAVA百科nction getAlbum()
{
    console.log("retrieving the albums");
    FB.api('/me/albums', function(response){
        console.log(response);
    });

    return true;
}

but the response object is as follows:

Object
 Data: Array[0]
    length: 0

I am having 2 public albums, but I cant able to retrieve them with above code. Can someone please tell me what I am doing wrong.

Thanks in advance :)


found the solution. the problem is that I missed the 'user_photos' permission. Now, everything works fine :)

0

精彩评论

暂无评论...
验证码 换一张
取 消