Documentation

LinkFacebookAccount

Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account

Request Details

Facebook sign-in is accomplished using the Facebook User Access Token. More information on the Token can be found in the Facebook developer documentation (https://developers.facebook.com/docs/facebook-login/access-tokens/). In Unity, for example, the Token is available as AccessToken in the Facebook SDK ScriptableObject FB. Note that titles should never re-use the same Facebook applications between PlayFab Title IDs, as Facebook provides unique user IDs per application and doing so can result in issues with the Facebook ID for the user in their PlayFab account information. If you must re-use an application in a new PlayFab Title ID, please be sure to first unlink all accounts from Facebook, or delete all users in the first Title ID.

LinkFacebookAccountRequest
Request Properties
AccessToken (required) String

Unique identifier from Facebook for the user.

ForceLink Boolean

If another user is already linked to the account, unlink the other user and re-link.

POST https://{{TitleID}}.playfabapi.com/Client/LinkFacebookAccount
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "AccessToken": "FaceAccessTokenID"
}
        

Response Details

LinkFacebookAccountResult
Result Properties

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8


Authentication

SessionTicket

Possible Error Codes

Name Code
AccountAlreadyLinked 1011
FacebookAPIError 1143
InvalidFacebookToken 1013
LinkedAccountAlreadyClaimed 1012