question

brendan avatar image
brendan asked

Facebook name

inesmoital
started a topic on Wed, 15 April 2015 at 10:37 AM

When I create a user using Facebook I cannot access the player full name as "FullName" that should be accessed using UserAccountInfo.FacebookInfo doesn't have the field that in it.

How can I access the player name when the account is created with facebook?

10 |1200

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

brendan avatar image
brendan answered

Best Answer
Brendan Vanous said on Wed, 15 April 2015 at 6:05 PM

Correct. We do not automatically put any Facebook (or other network) info in as the Title Display Name for the user. Since the Title Display Name needs to be unique on a per-title basis, you'll need to consider how you want to manage any duplicates.

Brendan


5 Comments
johntube said on Wed, 15 April 2015 at 10:41 AM

Don't rely on UserAccountInfo too much !

If you're Signing in to PlayFab with Facebook then you should already be using the Facebook SDK to get the token. Just use the Facebook SDK to get the profile name and any other information you're allowed to access.


inesmoital said on Wed, 15 April 2015 at 2:10 PM

There is a problem with this. When I'm retrieving the leaderboard there is no displayname for the user who as register with facebook.


Brendan Vanous said on Wed, 15 April 2015 at 6:05 PM

Correct. We do not automatically put any Facebook (or other network) info in as the Title Display Name for the user. Since the Title Display Name needs to be unique on a per-title basis, you'll need to consider how you want to manage any duplicates.

Brendan


inesmoital said on Wed, 15 April 2015 at 6:11 PM

I see you are right. Right now I'm just updating the user display name. Do you have any suggestions on how to solve this duplicates problem?


Brendan Vanous said on Wed, 15 April 2015 at 6:17 PM

Many titles choose to stick a randomly-generated number on the end. It's somewhat impersonal-seeming, but it does get the job done.

Brendan

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

adnannazir2012 avatar image adnannazir2012 commented ·

@Brendan
I can use Facebook SDK for current Player to retrieve it's name and avatar but can you please suggest how can I retrieve it for my Leaderboard Users ?
I want to create a leaderboard with Friends on Facebook using PlayFab. I am able to post and retrieve leadeboard data but I can't find a way to see user name and pictures in leaderboard.

0 Likes 0 ·
brendan avatar image brendan adnannazir2012 commented ·

The player's Title Display Name and Avatar URL can be returned via the profile constraints of any leaderboard call. You need to set the relevant permission in Settings->Client Profile Options in the Game Manager, to allow the client to get this data from the call, then set the correct profile constraint (ex: ProfileConstraints.ShowAvatarUrl) to true in the call.

1 Like 1 ·
adnannazir2012 avatar image adnannazir2012 brendan commented ·

Finally got that :)

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

Actually "result.AccountInfo.FacebookInfo.FullName;" is not intended to access Display name(PlayFab). Call works fine if you access some friend facebook name but not for local user.

It's either buggy or confusing

1 comment
10 |1200

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

brendan avatar image brendan commented ·

Sorry, can you clarify this? The behavior is that the FullName is recorded for the user, in their Facebook info. That FullName is not returned to other players on calls to GetAccountInfo, as it may be considered PII in some regions. It is returned in the Server API call GetUserAccountInfo, so that you can choose whether to pass it back or not.

0 Likes 0 ·

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.