1
votes

I'm currently trying to integrate the Unity Facebook SDK into my game. I've downloaded the SDK and trying to test the example that it have. I've insert my app id into the settings and can do the FB Init, and when I press the Login button a pop-up appear asking for the User Access Token. I've done some searching/asking and it seems this is because I'm running it inside the Unity Editor (on mobile it would get the token by itself).

I've heard that I can use the User Token from my Facebook Developer page for testing. However, when I paste the User Token from Facebook Developer->Tools->Access Token and press login, an error appear saying "Access token is not for current app id : XXXXXXXXX". I'm not sure what's wrong here since the app id it shows is the app id I got from Facebook. Is there another User Token that I should be using? Or is there some settings that I need to do first for this to work?

Thank you.

2
It seems that I managed to get this thing to work, although I'm still not sure why. All I did was test with a different app id and also insert a namespace for my app in the Facebook Developer site. Next thing I know it worked.rabbit87
I had the same problem, i restarted unity and in the unity Facebook Settings i pressed regenerate android manifest and it mysteriously worked..Anthony Raimondo

2 Answers

1
votes

I had this problem.

For me: I had trailing whitespace in the "App id" field in Facebook Settings.

E.g. I had in there "12345 " when I needed "12345".

Got rid of whitespace, all good.

0
votes

To clarify: I'm assuming you are doing your testing in the editor, which can work you just need to get an access token from the developer site.

I'm going to assume you got the access token from here: https://developers.facebook.com/tools/accesstoken/

I hate to assume error on your part, so let me know if you can repro this again and we can figure out what went wrong. Also, if I'm way off, please let me know.