Facebook OAUTH服务器端身份验证失败

时间:2012-05-25 02:56:26

标签: authentication facebook-graph-api

遵循此处定义的服务器端身份验证过程:https://developers.facebook.com/docs/authentication/server-side/

跑完这个命令:

https://www.facebook.com/dialog/oauth?client_id=xxxxxx&state=you&redirect_uri=http://lovers.net&scope=ads_management,offline_access

结果如下:

=“> HTTP://lovers.net/状态=你&安培;代码= AQA7c30iVuCyDJzlKP8-9z_Rv7JhpnHEEfsiT5doge1TL - WSXdK9NjCl7q7_Ldovrc9SrlaOZe9VzS1pvelthA2hD72Q5aTVjFlviNPuQJ1U3LP16e7zY7lI5avSlcL1wZoOYYi5JeoOsPwe9HaeQvtfBQSYVX2WQCbo2tVFYboSq1_FNSHOpAKsaW86-1IJM# =

我转向这个:

=“> HTTPS://graph.facebook.com/oauth/access_token CLIENT_ID = XXXX&安培; REDIRECT_URI = HTTP://lovers.net& client_secret = XXXXX&安培;代码= AQA7c30iVuCyDJzlKP8-9z_Rv7JhpnHEEfsiT5doge1TL - WSXdK9NjCl7q7_Ldovrc9SrlaOZe9VzS1pvelthA2hD72Q5aTVjFlviNPuQJ1U3LP16e7zY7lI5avSlcL1wZoOYYi5JeoOsPwe9HaeQvtfBQSYVX2WQCbo2tVFYboSq1_FNSHOpAKsaW86-1IJM# =

结果如下:

{    “错误”:{       “message”:“验证验证码时出错。”,       “type”:“OAuthException”,       “代码”:100    } }

1 个答案:

答案 0 :(得分:1)

您最有可能在调用redirect_uri时为/oauth/access_token参数指定了不同的值,就像您将用户发送到auth对话框时所做的那样 - 在示例中就是这种情况已发布在问题中,因此请检查代码中的情况。