I’ve created a blank project on Unity and Facebook Dev, then imported the Facebook SDK 5.1.0 for Unity. Then I setup the plugin, writing my App Name and App Id on FacebookSettings from toolbar. Then I load the Example scene provided by Facebook SDK. Hit Run. Everything its OK, but the UserID that show the screen its not my real Facebook User ID.
If I change the App Id on FacebookSettings to another (for example, other of my games created months ago), and then Hit Run, the screen show me my real Facebook User ID.
I ran into the same problem recently and boy it was frustrating, especially because it’s been a while since I follow the Facebook development roadmap.
Thought I’d share what I found here.
So basically Facebook recently upgraded their API version to 2.0 and with that come some changes. Basically the facebook login you do using facebook apps you’ve created recently will return an “app scoped user id” as designed by the Version 2.0 API, while you old fb apps which most likely are using Version 1.0 API will return the “real” user id.
You can still access the user’s profile for confirming whether you get the correct user id.
for example with the Version 1.0 user id, you can open http://facebook.com/
while with the Version 2.0 user id, you do it with Redirecting...
Thanks for the info. So, every app will have an unique user id (app scoped user id). Now I unterstand that. But I ran into another problem: I’m getting: Failed Downloading https://graph.facebook.com/1439608416292158/scores using the default Example scene from Facebook for Unity SDK, on Web Build.
The only thing that I added is the example code in FB.API:
int score = 10000;
var scoreData =
new Dictionary<string, string>() {{“score”, score.ToString()}};