Read this if you're using the Facebook Plugin

Discussion and feedback on Construct 2

Post » Mon Jul 21, 2014 12:31 pm

So I've been doing some experimentation with Facebook integration for my app and noticed that the UserId that I was pulling from the Facebook plugin no longer matched my Facebook user id.

After some research, here are my findings:

  • Since the Graph 2.0 API was introduced by Facebook, you are no longer going to get new user's Facebook User ID, instead Facebook will give you the "app-scoped user id". Near as I can tell, it's still unique, but definitely something to be aware of. I don't know if you can get the original user id based on an app-scoped user id.
  • The Scirra Facebook plugin is fetching the app-scoped id and using the javascript parseFloat to convert the value. Unfortunately, this seems to very occasionally introduce decimal values to the id, for example, when testing with my Facebook account, the app-scoped id changed from 38742387293 to 38742387293.0005. I made a modification to the actual Facebook plugin to return the app id as a string but anyone who doesn't feel comfortable modifying JS code can *probably* just use a floor command on the number.
Posts: 232
Reputation: 6,284

Post » Mon Jul 21, 2014 10:50 pm

You can't get the original anymore for the security of the users. It works just as well though. Also note that the id changes between apps. So if you have numerous apps you will not immediately know if someone is using all your apps. However if you sign up for the business api, you can access how many of your apps are used by a fb user.the 2.0 api is so much more secure from the developer and user points of view. I'm building a facebook plugin based on 2.0 right now.

We are here for you!
Posts: 716
Reputation: 17,092

Return to Construct 2 General

Who is online

Users browsing this forum: josgertz, Sebastien and 11 guests