Facebook seession is closed after log in process in Android

后端 未结 2 1978
甜味超标
甜味超标 2021-01-25 14:17

I\'m developing android app which require facebook login for posting facebook comments. However I\'ve got stuck on logging in. So I followed tutorial at https://developers.faceb

相关标签:
2条回答
  • 2021-01-25 14:24

    If you're using the LoginButton inside a fragment, then you need to call loginButton.setFragment from the containing fragment, and also override the onActivityResult method inside that fragment.

    See the tutorial here https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/

    0 讨论(0)
  • 2021-01-25 14:28

    Ok I solved it, based on "remote_app_id does not match stored id" exception i found answer https://stackoverflow.com/a/14421260/1618316 and printed facebook app id. First I generated app id with command from fb tutorial, but it was different to one printed by answer above. So I put new key at fb and now it works.

    But I still wonder how is possible that command from tutorial gave me wrong hash :/

    0 讨论(0)
提交回复
热议问题