FB.getLoginStatus always returns status='unknown'

前端 未结 3 1882
醉酒成梦
醉酒成梦 2021-01-15 08:36

If I am logged into facebook.com, I expect a call to FB.getLoginStatus will return a status=\'not_authorized\'. Instead it returns status=\'unknown\', even if I pass true fo

相关标签:
3条回答
  • 2021-01-15 08:54

    Maybe you have third party cookies disabled.

    0 讨论(0)
  • 2021-01-15 08:57

    I had similar issue, even when the 3rd party cookie is not disabled. What I did to bypass is: if I get 'unknown' response, I will call FB.login and inside that call the FB.loginStatus again. This time, FB returned correct value.

    0 讨论(0)
  • 2021-01-15 09:17

    And to elaborate slightly on David's answer, Facebook describes this as a "by design" result when 3rd party cookies are disabled.

    Unfortunately, I'm not sure of the most graceful way of handling this -- at least in my site, I need an oath token to load some data.

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