0

遵循此处定义的服务器端身份验证程序: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/?state=you&code=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&code=AQA7c30iVuCyDJzlKP8-9z_Rv7JhpnHEEfsiT5doge1TL--WSXdK9NjCl7q7_Ldovrc9SrlaOZe9VzS1pvelthA2hD72Q5aTVjFlviNPuQJ1U3LP16e7zY7lI5avSlcL1wZoOYYi5JeoOsPwe9HaeQvtfBQSYVX2WQCbo2tVFYboSq1_FNSHOpAKsaW86-1IJM# =

结果是:

{ "error": { "message": "验证验证码错误。", "type": "OAuthException", "code": 100 } }

4

1 回答 1

1

您很可能redirect_uri在调用中/oauth/access_token为参数指定了不同的值您的代码中的案例。

于 2012-05-25T05:19:24.950 回答