question

robert avatar image
robert asked

GetFriendsList (includeFacebookFriends), no FacebookInfo returned

Client GetFriendsList with IncludeFacebookFriends = true returns all Facebook friends correctly, but returned FacebookInfo is always null.

Reading the forum / documentation history if this is intended or not is a bit complicated because of new addition like profile constraints, privacy restrictions, etc..

So, primary question, should FacebookInfo be set for facebook friends when queried with GetFriendsList? We definitely hope so as we need to get the facebooks friend ID for further actions.

GetFriendsListRequest request = new GetFriendsListRequest();
		
request.IncludeFacebookFriends = true;
request.ProfileConstraints = new PlayerProfileViewConstraints();
request.ProfileConstraints.ShowStatistics = true;
request.ProfileConstraints.ShowAvatarUrl = true;
request.ProfileConstraints.ShowLocations = true;
		
PlayFabClientAPI.GetFriendsList(request, 
(result)=>
{
}
foreach (PlayFab.ClientModels.FriendInfo _friend in result.Friends)
{
	// ALWAYS NULL EVEN FOR FACEBOOK FRIENDS
	if (_friend.FacebookInfo != null)
	{
	       Debug.Log("FacebookFriend " + _friend.FacebookInfo.FacebookId);
2 comments
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

It seems I cannot reproduce your issue:

May I ask have you added friends for the player on PlayFab side? (not Facebook side)

-1 Like -1 ·
robert avatar image robert Seth Du ♦ commented ·

I guess you omitted the ProfileConstraints?

Just found out that if you DO NOT set ProfileConstraints then FacebookInfo is returned. (Appears to be the same with Tags)

As a workaround we will fetch the entire friends list twice in the meantime and "merge" the results.

Can you confirm the FacebookInfo is null as soon as you use ProfileConstraints?

Thanks for the fast reply, btw

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

Ah, Interesting. I have reproduced your issue. I will file a bug and report to the product team.

6 comments
10 |1200

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

robert avatar image robert commented ·

Thanks for confirming, we will use the workaround to query friends list twice in the meantime

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ robert commented ·

I will mark the answer as a closure of this case since the bug has been filed in our backend. I will keep this thread updated when there is feedback from the team.

0 Likes 0 ·
franklinchen avatar image franklinchen commented ·

The issue as Facebook Friends's info is missing when IncludeFacebookFriends and ProfileConstraints are configured in GetFriendsListRequest is fixed now

0 Likes 0 ·
etxe1000 avatar image etxe1000 franklinchen commented ·

Can you confirm this is fixed? I'm getting the same issue. If I don't set ProfileConstaints the FacebookInfo is returned. If I set ProfileConstraints( ShowStatistics = true) the FacebookInfo is null.

0 Likes 0 ·
franklinchen avatar image franklinchen etxe1000 commented ·

Thanks for your feedback, I just informed team to investigate this issue, I will let you know the update, thanks

0 Likes 0 ·
Show more comments
robert avatar image
robert answered

Thanks for letting us know! Removing workaround...

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.