简体   繁体   中英

Get facebook albums and album images?

Hello Friends

I am trying to get facebook album of a user . Problem is that it is returning albums for the user who is created the facebook app or who is the admin of that application .

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. 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. 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:

  • 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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