chechu/grails-facebook-graph — Issue #12: problem with session.facebook. Is null
Author: xanto
Created: 2012-01-12 18:47:40+00:00
State: open

Hi, thanks for upgrading so quickly the plugin to oauth 2.0, but i've a problem.
After the login with facebook the application correctly redirect to controller QAuth and action facebookLogin

...

...

but in this action session.facebook is null

after some debugging the problem seems to be in createFacebookData(data) in class FacebookGraphService

at
...
if(!facebookData?.access_token || !facebookData?.uid || !facebookData?.expires) {
facebookData = null
} else {
// Setting the expiration date
now = Calendar.getInstance()
now.add(Calendar.SECOND, facebookData.expires as Integer)
facebookData.expiresDate = now.time
}
...
the facebookData is set to null each time, because the facebookData.expires is null

Notice: the access token and uid are presnt

plugin used : facebook-graph-0.14