I like Facebook linking for two reasons:
- I can get a usable display name that I don’t have to check for inappropriate words.
- It allows players to move their game progress from one device to another. Even when the devices are not the same eco-system.
Of course, the integration file (attached) only calls Facebook when you call it. It is completely optional.
- First, add Facebook to your Cordova project by navigating to the project and typing the add plugin command. Please fill the appropriate values for “app id” and “name of app.” Do not include the less/more than symbols when you type the appropriate info.
-
cordova plugin add cordova-plugin-facebook4 –save –variable APP_ID=”<app id>” –variable APP_NAME=”<name of app>”
-
- In GameSalad, create a table named “facebook.” For now, it needs to be at least one column, but the number of rows does not matter. The data in the picture is for illustration purposes only. The integration will clear these rows out.
- After you have called Playfab request, you can link the Facebook request at any time. In my app, I added an icon to the bar at the top, and when a person touches, they log into Facebook. I call “Post Score” with the Facebook table.
- In the future, I will expand what I record from Facebook. Currently, I populate the table with connection status, access token, and short name (that I use as the display name).
Here is what it looks like from within the app.
And you get an extra box in Playfab:
Always open to questions or comments.