Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: expires @ line 77 #7

Closed
jhuriez opened this issue Jun 20, 2013 · 8 comments
Closed

Undefined index: expires @ line 77 #7

jhuriez opened this issue Jun 20, 2013 · 8 comments

Comments

@jhuriez
Copy link

jhuriez commented Jun 20, 2013

After login i have this error :

[ Notice ]: Undefined index: expires
/vendor/opauth/lib/Opauth/Strategy/Facebook/FacebookStrategy.php @ line 77

It's at line 77.
For info, Twitter and Google opauth's work fine

@ceeram
Copy link
Member

ceeram commented Jun 20, 2013

I cant reproduce this locally, $results include the 'expires' data for me.
You could do a var_dump() of $results to check what the data looks like.

2013/6/20 Julien Huriez [email protected]

After login i have this error :

[ Notice ]: Undefined index: expires
/vendor/opauth/lib/Opauth/Strategy/Facebook/FacebookStrategy.php @ line 77

It's at line 77.
For info, Twitter and Google opauth's work fine


Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.

@jhuriez
Copy link
Author

jhuriez commented Jun 20, 2013

Yes, the result :

array (size=1)
  'access_token' => string 'CAAGhIhET58UBAP2th9Jpq65qSdCMaajpqkKP6ZAZBwsDiXmSzOFPABZCPOXAA20vhQdZBSXK0gFTZB7e78vmylgcvsCzNtC59Mg24r0mBm1DHJ93tUXJ1ZAy3F0ZAVRcYnBYjRZCINfZBkbtzIiStj9nJUDCLKf3g5NwcZD' (length=168)

@uzyn
Copy link
Member

uzyn commented Jun 20, 2013

I can't reproduce this either. You might want to check that you're using the latest versions of Opauth and Facebook strategy.

Also, give it a try at https://opauth.org/

@jhuriez
Copy link
Author

jhuriez commented Jun 20, 2013

Yes i have the latest versions of Opauth and Facebook Strategy. It's strange because it's work with Twitter, Google, Github and Instagram

PS: I use it with FuelPHP framework (1.6)

@ceeram
Copy link
Member

ceeram commented Jun 20, 2013

Looks like on some occasions this happens to other people as well:

https://developers.facebook.com/bugs/339375252810525/

Even though they have closed the bug, this is a bug on facebook side, which
we cannot fix without more information. Neither that ticket or ourselves
have info to reproduce it.

2013/6/20 Julien Huriez [email protected]

Yes i have the latest versions of Opauth and Facebook Strategy. It's
strange because it's work with Twitter, Google, Github and Instagram


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-19750882
.

@tompiard
Copy link

Same bug here,

When the app is allowed by my facebook account, the access_token is retrieved correctly, then after a few tries the facebook response doesn't contain the "expires" field anymore.
Happens everytime !

It's definitely a Facebook issue, but the library should implement a catch or something.

If anyone have informations to avoid that... :)

@uzyn
Copy link
Member

uzyn commented Sep 18, 2013

@tompiard I'm not sure if this is relevant: http://stackoverflow.com/questions/15923326/facebook-access-token-missing-expiry-property-after-offline-access-deprecations

And also https://developers.facebook.com/roadmap/offline-access-removal/

One way to get over this as a consumer is not to rely on expires but to simply store the tokens and use them when needed. When usage fails, request a new one. From what I can gather, Facebook is discouraging apps from using long-lived token.

@ajfranzoia
Copy link

Could be related to #16

@YuzuruS YuzuruS closed this as completed Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants