Unity Facebook Login Tutorial

Posted on  by 



We’ve just added a new tutorial to our help system showing how to quickly implement Facebook Login and Friends Leaderboards in your game using ChilliConnect. Facebook Login has become a staple of many mobile titles, enabling players to resume progress across different devices and compete and share progress with friends.

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from the Facebook Audience Network via waterfall and Open Bidding mediation. It covers how to add Facebook ads to an ad unit's mediation configuration and how to integrate the Facebook Audience Network SDK and adapter into an Unity app. Facebook SDK in Unity: Basic Login Integration Tutorial UPDATE 18th January 2016: The new tutorial covers how to use Facebook SDK 7.3.0 to login, and get the Username and Profile Pic As part of my Facebook integration with Unity series, I present the first tutorial. The recent popularity in Facebook Instant Messenger Games means a great opportunity for indie developers with Unique ideas. However there is little to no documentation on how to convert a Unity Game to Instant platform, with the only viable option being expensive external softwares.

Our tutorial takes you through everything you need to add Facebook Login to your game, including setting up the Facebook App, integrating the SDK in to Unity and implementing a robust, friction-less login flow for your players in addition to retrieving leaderboard scores for Facebook friends.

The full tutorial is available in our docs site, and you can get the code from our GitHub samples repository. As always, if you have any further questions simply get in touch and we’ll be happy to help. If you’ve not tried ChilliConnect for yourself yet, sign up for free today.

Since the last set of Facebook tutorials that I created there has been some changes to the SDK. We’re now on 7.3.0 at the time I write this post.

Some of the more notable changes are the new IResult replacing FBResult, FB.LogInWithReadPermissions as the new way of initialising the first login.

Unity Tutorial Pdf

In the video tutorial I mentioned about the OnGUI bug which is currently in Facebook SDK 7.3.0 which I know has plagued some of you while trying to make my previous tutorials work. To be exact that bug is:

Facebook have mentioned they will fix this in the next release of the SDK. So for now we have to use a work around so we can carry on working!

To fix this, open up FacebookSDK/SDK/Scripts/PlatformEditor/EditorFacebookMockDialog.cs and find:

Unity Facebook Login Tutorial

Then insert the following code after that line – so that it’s the first code inside of OnGUI:

After doing this you will still get a small error, but it’s ignorable since it doesn’t actually break anything.

I hope the tutorial helps, let me know in the forums if there are any bugs!

Unity Facebook Login Tutorial Microsoft

Here’s the full code from FBscript.cs for your convenience:

If this tutorial helped please share it! If you would like to be notified when I release new tutorials then subscribe to my email list (the subscribe box is in the sidebar). Lastly, if you would like to help me then you can become a Patron at patreon.com/greyzoned.

Facebook

Until next time, Happy Coding!

Glenn





Coments are closed