Facebook SDK 5.0.4 for Unity, Android, Login Fails, Correct Hash Key

I think I have the same problem as in this post.

I am using Unity4.3.0f4 and Facebook SDK 5.0.4 beta.

I use the correct key hash (not the debug one) which I obtained by FB.Android.KeyHash. On my own device, as well as on BlueStacks emulator, I manage to log in and FB.Feed normally. However, other users that have tested the app cannot login. FB.Login("publish_actions", callback) is called, the permission dialog is shown, the user taps OK and then returns to game. Result.text is then

{"is_logged_in":false, "user_id":"", "access_token":"", "access_token_expires_at":"01/01/0001 00:00:00"}

Any idea?

  • ps. On my phone i have an earlier version of the Facebook app, not the last one.
  • ps2. You can download my app and take part in the beta testing to see the problem yourself.

Answers


Ok, after all the problem was that I was trying to log in while immediately requesting the publish_actions permission, which by the way is NOT needed for FB.Feed().

FB.Login ("publish_actions", AuthCallback); // WRONG!!!!!!

Finally I used

FB.Login ("", AuthCallback); // Ok

and it works properly at last.


Make sure your test users can see the app.

My guess in your app is sandboxed and your test users are not listed on Developer Dashboard.

Either un-sandbox it, or add them as Testers(its in Roles tab)


Need Your Help

PDPageContentStream has no drawLine() method

java eclipse pdfbox

So I just started using Apache PDFBox (0.7.3) in one of my projects to write to PDF. I want to draw a line across the whole page, which according to the docs and many examples I have seen, I should...