0
votes

Following the server-side authentication proceedures defined here: https://developers.facebook.com/docs/authentication/server-side/.

Ran this command:

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

Which results in this:

=">http://lovers.net/?state=you&code=AQA7c30iVuCyDJzlKP8-9z_Rv7JhpnHEEfsiT5doge1TL--WSXdK9NjCl7q7_Ldovrc9SrlaOZe9VzS1pvelthA2hD72Q5aTVjFlviNPuQJ1U3LP16e7zY7lI5avSlcL1wZoOYYi5JeoOsPwe9HaeQvtfBQSYVX2WQCbo2tVFYboSq1_FNSHOpAKsaW86-1IJM#=

Which I turn into this:

=">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#=

Which results in this:

{ "error": { "message": "Error validating verification code.", "type": "OAuthException", "code": 100 } }

1

1 Answers

1
votes

Most likely you've specified a different value for the redirect_uri parameter in the call to /oauth/access_token as you did when you sent the user to the auth dialog - this is the case in the example you've posted in the question, so check it's not also the case in your code.