3

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.
Community
  • 1
  • 1
babis
  • 228
  • 1
  • 9
  • There are answers in the other post that you linked. Did they help you out at all? – Brian Jew Mar 12 '14 at 18:52
  • @BrianJew The answer wasn't there when I created the question. I added the new hash key to the Facebook App Dashboard. I will have the users test it and let you know. Thanks for pointing out. – babis Mar 12 '14 at 19:20
  • @BrianJew it didn't fix the problem... I don't think it is a key hash error. As I mentioned above, I use the correct key hash, from the keystore with which I sign my application, **not** the debug one. – babis Mar 12 '14 at 20:01

2 Answers2

1

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.

babis
  • 228
  • 1
  • 9
  • you should be able to request "publish_actions" without any problem.. what you may have experienced is orientation bug described here http://stackoverflow.com/a/21368820/3179004 – juraj Mar 18 '14 at 21:32
  • @juraj it was not the orientation bug: I had already modified the manifest according to the answer you 've indicated. Also, when I changed `FB.Login ("publish_actions", AuthCallback)` to `FB.Login ("", AuthCallback)` (_and this was the **only** difference between the two beta versions of the app_) it started working properly for everyone. Do you have an explanation for this other than mine? Please do not downvote if you are not sure that this actually solved my problem. – babis Mar 18 '14 at 21:48
  • 1
    No worries, I haven't downvoted you(don't even have enough rep) + I upvoted you right now! It is a bug, requiring only "publish_actions" doesn't work, your solution or requiring "email,publish_actions" works just fine. We will take a at it. Thanks for your report! – juraj Mar 27 '14 at 20:50
0

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)

juraj
  • 439
  • 2
  • 9
  • The app is not in sandboxed mode... At the Developer Dashboard, I go to `Status & Review` and the button `Do you want to make this app and all its live features available to the general public?` is turned ON (`YES`). Also there is a green circle next to the app name. – babis Mar 15 '14 at 14:05