question

brendan avatar image
brendan asked

Getting facebook firends?

Jibran
started a topic on Tue, 25 August 2015 at 11:11 PM

i have been trying to access the facebook friendlists of the facebook test users through photon. am using this code

public void FriendLists(){

        GetFriendsListRequest request = new GetFriendsListRequest ();

        request.IncludeFacebookFriends = true;

        PlayFabClientAPI.GetFriendsList (request, GetFriends, FriendListError);

    }

    void GetFriends(GetFriendsListResult result){

        friends = result.Friends;
        Debug.Log("Friends");
        for(int i=0;i<friends.Count;i++){

            Debug.Log(friends[i].Username);


        }

I have saved the facebook app id and secret in playfab/setting/secret keys

All my test users are friends with each other

I have also logged in from the individual accounts to play fab.

but the friendlist still returns a null.

where am i going wrong?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

1 Comment
Brendan Vanous said on Wed, 26 August 2015 at 6:43 PM

Yes, setting IncludeFacebookFriends to true will cause the API to include Facebook friends who have also played the same game (Title ID), if those friends have also linked their Facebook account to their PlayFab account.

First, double-check that the Facebook App ID and Secret have been entered correctly for your title. Next, check that the players in question have all linked their Facebook accounts. If both of those check out, could you send us the PlayFab sign-in credentials for a user in this state (you can email devrel@playfab.com)?

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.