Cross platform App token aquiring for Unity

I'm completely new to the whole facebook login scene. Unfortunately the login process seems so complicated considering I simply want to be able to call a login dialog and get back the user's App Token. When I run the example code the login screen asks for an app token not an email and password like I'd expect to see as a user.

From my understanding it appears that even using the Facebook Unity SDK I am still required to build my own login page with app token generator which I have no idea how to do. It also appears there are different ways it needs to be done whether you are on IOS, Android, Web Player, Windows and Windows Phone. Is there really not one way to do this?

I followed the tutorial here: https://developers.facebook.com/docs/games/unity/unity-tutorial although all the images regarding setting up your app on developers.facebook.com/apps are out of date and I can't find a good majority of the options it mentions.

So I guess my main questions are:

  • Can you have one way across all platforms to allow email/password login for a user?
  • Do you need to build your own token generator on a website?
  • How do I set up a game for Unity in the new facebook layout?

Thanks everyone. I've never dealt with authentication via any online service before and this seems much preferable to having my own login authentication for my games. I just wish it wasn't such a confusing mess to someone who has never dealt with any of this before.

Answers


The app token thing is only used in Unity editor, so only in development. This is a work-around, since it was impossible to simulate regular facebook login flow in Unity editor and we wanted devs to be able to test their games in the editor, which is much faster than building and uploading it.

You are not supposed to create your own login process. Just import the sdk package into Unity and open scene InteractiveConsole in Assets\Examples Try building it for iOS/android/canvas, it works on all platforms without any code change necessary

Let me know if have any problems


1 and 2

My assumption is the access "token" you mention is a generic login for testing in unity. Your app should handle the login differently across platforms, in regard to the "Facebook Unity SDK API's" handling the bulk stuff so you are free to plug and play.

3 Image of my settings for the canvas demo https:// developers .facebook .com/apps/#____#/settings/

https://drive.google.com/file/d/0B7Lk_CfjfKfTdVlNQWlINkNCTU0/edit?usp=sharing


Need Your Help

Understanding regex in Java: split("\t") vs split("\\t") - when do they both work, and when should they be used

java regex split

I have recently figured out that I haven't been using regex properly in my code. Given the example of a tab delimited string str, I have been using str.split("\t"). Now I realize that this is wrong...

SQL Server NOLOCK and joins

sql sql-server nolock

Background: I have a performance-critical query I'd like to run and I don't care about dirty reads.