开发者

I got empty response from create album in facebook graph api?

i have this URL ..

https://graph.facebook.com/602414132/albums?access_token=123005381082600|2.FUPHmHF4kfDPly2GRPYDeg__.3600.1298228400-602414132|1JU开发者_C百科Kjvfo1Ri5s04x9v_vzf-sS8c&type=post&name=refacingme

when i using Chrome i get empty response :

{
   "data": [

   ]
}

from where do you think the error is coming ??


It is true, I just fixed this bug a few days ago myself. The user must grant Extended Permissions for user_photos on your app. A few ways to do this:

1) Update your app info in FB Developer tab and add Extended permissions to your app. This will ask new users who register to give certain permissions before joining.

2) Alternatively, if the user has already added the app you can ask the user for permissions using the Javascript SDK call FB.login while they are in the app. (see code below)

FB.login(function(response) {
  if (response.authResponse) {
      // user is logged in and granted some permissions.
      console.log("user is logged in and granted some permissions.")
  } else {
    // User cancelled login or did not fully authorize.
    console.log("he failed to login or something")
  }
}, {scope:'user_photos'});

This route requires you have set up the Facebook JavaScript SDK


I think you have not taken Extended Permission of user_photos. Take extended permission then you will not receive empty array

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜