我在 facebook graph api 中创建相册时收到空响应?

发布于 2024-10-18 13:21:20 字数 330 浏览 0 评论 0原文

我有这个 URL ..

https://graph.facebook.com/602414132/albums?access_token=123005381082600|2.FUPHmHF4kfDPly2GRPYDeg__.3600.1298228400-602414132|1JUKjvfo1Ri5s04x9v_vzf-sS8c&type=post&name=refacingme

当我使用 Chrome 时,我得到空响应:

{
   "data": [

   ]
}

你认为错误来自哪里?

i have this URL ..

https://graph.facebook.com/602414132/albums?access_token=123005381082600|2.FUPHmHF4kfDPly2GRPYDeg__.3600.1298228400-602414132|1JUKjvfo1Ri5s04x9v_vzf-sS8c&type=post&name=refacingme

when i using Chrome i get empty response :

{
   "data": [

   ]
}

from where do you think the error is coming ??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我乃一代侩神 2024-10-25 13:21:20

确实如此,我自己几天前刚刚修复了这个错误。用户必须为您的应用上的 user_photos 授予扩展权限。有几种方法可以做到这一点:

1)在 FB Developer 选项卡中更新您的应用程序信息,并向您的应用程序添加扩展权限。这将要求注册的新用户在加入之前授予某些权限。

2) 或者,如果用户已经添加了应用程序,您可以在用户使用应用程序时使用 Javascript SDK 调用 FB.login 向用户请求权限。 (请参阅下面的代码)

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'});

此路线要求您设置 Facebook JavaScript SDK

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

惟欲睡 2024-10-25 13:21:20

我认为您尚未获得 扩展权限 Developers.facebook.com/docs/authentication/permissions/" rel="nofollow">用户照片。获得扩展权限,那么您将不会收到空数组

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文