The Facebook SDK (7.1.0) for Unity came out in late September and I’ve been playing around with it in Unity 5.2. I’m finding out what Facebook integration really means in terms of the api calls, posting scores, achievements, app invites, and sharing. I’ve also set up Parse.com to use as my backend for now.
Even though there isn’t much in terms of straight-forward documentation or tutorials online, it was possible to figure things out. Grey Zoned’s tutorials were helpful but I needed to update as things have changed a little in the 7.1 release. I’ve got things working well enough that I may consider creating a Facebook Canvas version of Paws on top of the iOS and Android versions.
The coolest thing is the integration with Parse.com that I am using to store my leaderboard/score data. As Facebook only allows the storing of one high score per game, I needed to store a score for each user for 80 levels. After connecting to Facebook, we grab the user’s FB id, profile picture and name, as well as store a list of friends that have authorized the game while also creating a new user on Parse using the FB id. The list of friends is used to query the top 4 high scores for each level from Parse and at the same time pull their profile pictures using a FB.API call.
Pretty neat. Look forward to going deeper into the Facebook integration.
Check out Paws. Coming soon.