skip to Main Content

I’m developing android app which integrates Facebook SDK.
I need to login – OK, done this.
I need to retrieve friends birthdays – I know it is restricted. But can it be allowed after app review?

Or how to retrieve my friends list and birthday of each friend?

Thank you.

EDIT:
It looks strange to me that when using Facebook Graph API Explorer I do friend list request (e.g. graph.facebook.com/1012984682046884/friends) I’m getting full list of my friends. But when I do the same request from android application (see code below), I’m getting result:
onCompleted resp[{“summary”:{“total_count”:228},”data”:[]}]
Here is list of permission I’m requesting during login:
loginButton.setReadPermissions(Arrays.asList(“public_profile”, “email”, “user_birthday”, “user_friends”));
Also, have to tell that I am admin of my FB app, I use the same FB login.

    GraphRequest request = GraphRequest.newGraphPathRequest(
            act,
            fbuid+"/friends",
            new GraphRequest.Callback() {
                @Override
                public void onCompleted(GraphResponse response) {
                    // Insert your code here
                    Log.d("12x17","onCompleted resp["+response.getRawResponse()+"]");
                }
            });

    request.executeAsync();

2

Answers


  1. If your app hasn’t been approved yet by Facebook to retrieve that information through the Graph API you will only be able to retrieve the information for people on your friends list that are listed as Administrators, Developers, or Testers on your Facebook app developers page. Add a trusted friend or 2 to one of those categories and you should be able to retrieve that information

    Login or Signup to reply.
  2. Or how to retrieve my friends list and birthday of each friend?

    By making each friend log in to your app, and having them grant your app permission to access their friends, and their birthday.

    No, there is no other way. You can not get friends that are not users of the same app, and you can not get a person’s birthday unless they personally grant permission.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search