Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth & facebook access_token not working, need OAuth expert

I have read the 1000+ blogs about how the redirect_uri has to be the same in both calls to OAuth in order to get a user token, but 100% of the time, regardless of how I format the URL, it fails with:

{
   "error": {
      "message": "Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request",
      "type": "OAuthException",
      "code": 100
   }
}

I have been meticulous in making sure that the URLs in both calls were the exact same. My URL has to have a ? in it and I have tried replacing it with %3f but that didn't help. There has to be something else that can cause this error, I need to learn what that might be?

This seemed to break for me over the past month sometime. We did a show in late July and things worked fine (had a different base URL for that show since it was a different server). Could it be that the URL is of this format:

someprestuff.morestuff.mainurl.com?prm=value

Are there too many "parts" to the URL for Facebook to accept it?

I'm looking for alternate things to look for.

like image 617
Jim Hunter Avatar asked Dec 26 '22 14:12

Jim Hunter


2 Answers

The url should be the same and it has to be escaped. In the url it has to look like this:

http%3A//someprestuff.morestuff.mainurl.com%3Fprm%3Dvalue
like image 130
ChuckE Avatar answered Mar 03 '23 04:03

ChuckE


Jim's comment above worked, but to clarify, it was a forward slash that fixed it for us.

like image 26
Secondtoe Avatar answered Mar 03 '23 06:03

Secondtoe