Login   Register  
PHP Classes
elePHPant
Icontem

StoreAccessToken() not being called???

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP OAuth API  >  All threads  >  StoreAccessToken() not being called???  >  (Un) Subscribe thread alerts  
Subject:StoreAccessToken() not being called???
Summary:Where's my access_token?
Messages:4
Author:Bart Steward
Date:2012-12-19 20:32:12
Update:2012-12-20 17:42:04
 

  1. StoreAccessToken() not being called???   Reply   Report abuse  
Picture of Bart Steward
Bart Steward
2012-12-19 20:32:12
I'm trying to implement this inside the CakePHP framework. I understand that Process() handles the API authorization, however when I trace using error_log(), the StoreAccessToken() never gets called. At what point does the access_token get returned to PHP so that I can grab it? Any help is appreciated!


  2. Re: StoreAccessToken() not being called???   Reply   Report abuse  
Picture of Bart Steward
Bart Steward
2012-12-19 21:41:31 - In reply to message 1 from Bart Steward
Update: I'm getting this error message in the "access_token_error" variable. I'm trying to connect to Facebook in this case. However, I don't see a problem with the redirect_uri I set as the error implies...?!?

it was not possible to access the OAuth access token: it was returned an unexpected response status 400 Response: {"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}}

  3. Re: StoreAccessToken() not being called???   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2012-12-20 00:45:04 - In reply to message 2 from Bart Steward
The redirect_uri domain must be the same as the one that is in the Facebook application App Domains field.

  4. Re: StoreAccessToken() not being called???   Reply   Report abuse  
Picture of Bart Steward
Bart Steward
2012-12-20 17:42:04 - In reply to message 3 from Manuel Lemos
Thanks for replying. Unfortunately the redirect_uri looks good. Facebook is authenticating the app just fine. It seems to me that process() isn't parsing the token out of the returned code properly. I'm getting this URL returned to me from Facebook.

http://bart.jobbump.shareframe.net:8801/SocialChannels/authe ...

The URL in my Facebook App settings is also:
http://bart.jobbump.shareframe.net:8801/SocialChannels/authe ...

I'm still getting these errors back...
Notice (8): A session had already been started - ignoring session_start() [APP/Controller/Component/OauthClientComponent.php, line 183] << This is your script in a CakePHP component.

and this error from 'access_token_error'...
it was not possible to access the OAuth access token: it was returned an unexpected response status 400 Response: {"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}}