Comments (5)
Looks like you're getting an Error 400: Bad Request from Facebook Graph API.
If it fails only some of the time, then it could be Facebook API that's having a problem during that time.
However, you might also want to check if you have openssl enabled at your PHP.
from facebook.
Could you provide some more information, opauth response should contain additional info like seen here:
http://awesomescreenshot.com/0fb1glkvfd
from facebook.
the error is:
array(
'error' => array(
'provider' => 'Facebook',
'code' => 'access_token_error',
'message' => 'Failed when attempting to obtain access token',
'raw' => 'HTTP/1.0 400 Bad Request
Access-Control-Allow-Origin: *
Cache-Control: no-store
Content-Type: text/javascript; charset=UTF-8
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Pragma: no-cache
WWW-Authenticate: OAuth "Facebook Platform" "invalid_code" "This authorization code has been used."
X-FB-Rev: 863722
X-FB-Debug: 4xUcr6QkWu+1iRK7MKRuLNB6s/RrDAjFK55XTEqV7+8=
Date: Tue, 02 Jul 2013 16:40:03 GMT
Connection: close
Content-Length: 97'
),
'timestamp' => '2013-07-02T16:40:03+00:00',
'validated' => false
)
Invalid code error? it is impossible. I used correct app credentials.
(I only checked Website with Facebook Login in the app settings)
from facebook.
You are not supposed to reuse the one-time authorization code.
To reauthenticate user, start from the beginning, eg. /auth/facebook
from facebook.
sure, i always start with /auth/facebook
uzyn, maybe i found the problem:
in my AppController i have:
public $components = array(
/*'Security',*/
'Session',
'Auth' => array(
'loginAction' => array(
'controller' => 'users',
'action' => 'login'
),
'logoutRedirect' => array(
'controller' => 'pages',
'action' => 'home'
),
'authenticate' => array(
'OpAuth',
'Login',
),
'authorize' => array('Controller')
)
);
if i comment 'authorize' => array('Controller') it works correctly! (always).... now i have to understand why this problem.... maybe my custom Authenticate class?
from facebook.
Related Issues (20)
- Use of this from within Closure HOT 5
- Second connect HOT 3
- Incorrect GET variables
- Undefined index: expires @ line 77 HOT 8
- Add email scope to defaults HOT 1
- EDIT: Wrong repo! HOT 1
- popin facebook strategy
- Fatel Error : Config Parameter expected HOT 1
- 'Undefined index: error' in FacebookStrategy.php:112 HOT 1
- Process 'middle_name' element HOT 2
- Latest HOT 4
- Undefined index when Facebook gives an error
- Facebook Strategy HOT 1
- Documentation bug: setting variables
- Still alive? HOT 16
- Error keys for Error-Callback wrong HOT 1
- how to set scope for fb api like user_birthday HOT 1
- Facebook folder is ignored by git HOT 2
- New tag/release to be consumed via Composer/Packagist HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook.