Redirecting to authentication dialog - “An error occurred. Please try again later”

前端 未结 30 2055
执念已碎
执念已碎 2020-11-29 04:08

Why does it always happen to me?

This happens after my application verify for user user login and redirect user to the authentication page:

https://w

30条回答
  •  天命终不由人
    2020-11-29 04:36

    I had this error because I was using redirect_url as a parameter instead of redirect_uri.

    The Server-Side Authentication doc page says to use redirect_url:

    https://www.facebook.com/dialog/oauth?
        client_id=YOUR_APP_ID
       &redirect_url=YOUR_REDIRECT_URI
       &scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES
       &state=SOME_ARBITRARY_BUT_UNIQUE_STRING
    

    But this is incorrect. The OAuth Dialog doc says to use redirect_uri instead, which works, so I'm assuming that you can only use one and not the other:

    https://www.facebook.com/dialog/oauth/?
        client_id=YOUR_APP_ID
        &redirect_uri=YOUR_REDIRECT_URL
        &state=YOUR_STATE_VALUE
        &scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES
    

提交回复
热议问题