简体   繁体   English

获取Facebook相册和相册图像?

[英]Get facebook albums and album images?

Hello Friends 你好朋友

I am trying to get facebook album of a user . 我正在尝试获取用户的Facebook相册。 Problem is that it is returning albums for the user who is created the facebook app or who is the admin of that application . 问题是它正在为创建了Facebook应用程序或该应用程序管理员的用户返回相册。

For rest of the users it is returning the empty array 对于其余用户,它将返回空数组

new Request(session, "/me/albums", null, HttpMethod.GET,
                        new Request.Callback() {
                            public void onCompleted(Response response) {
                                System.out.println("Responce "
                                        + response.getGraphObject());
                            }
                        }).executeAsync();

This work for me because i have create a facebook app and for the rest of the users it is not returning the data. 这对我来说是有效的,因为我已经创建了一个facebook应用程序,而对于其他用户而言,它没有返回数据。 Please let me know how to resolve this. 请让我知道如何解决此问题。

Thanks Amit 谢谢阿米特

When your application is in sandbox/development mode you can not perform any api call for other user. 当您的应用程序处于沙箱/开发模式时,您无法为其他用户执行任何api调用。 To test your for other user, add the user as a tester, developer or admin. 要测试其他用户,请将该用户添加为测试人员,开发人员或管理员。 See details here 在这里查看详细信息

Since you probably ask for the user_photos permission already (else it would not work for the admin), there are two possible problems why it does not work for other users: 由于您可能已经请求了user_photos权限(否则它对管理员不起作用),所以存在两个可能的问题,为什么它对其他用户不起作用:

  • Your App is in not set public. 您的应用未公开。 Go to the "Status & Review" tab of your App settings and make sure that checkbox on top says "YES". 转到您的应用设置的“状态与查看”标签,并确保顶部的复选框为“是”。
  • Most permissions (like user_photos) need to get reviewed by Facebook before you can use them for any other user: https://developers.facebook.com/docs/apps/review/login 您必须先通过Facebook审查大多数权限(例如user_photos),然后才能将其用于任何其他用户: https : //developers.facebook.com/docs/apps/review/login

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM