agorapulse / grails-facebook-sdk

Facebook SDK Grails Plugin
http://agorapulse.github.com/grails-facebook-sdk/guide
30 stars 13 forks source link

facebookContext.user.token is NULL #19

Closed confile closed 11 years ago

confile commented 11 years ago

When I use FacebookContext facebookContext in a controller facebookContext.user.id returns the corrent id, but facebookContext.user.token is empty.

To get the token I have to store it in my user model. May be something went wrong and facebookContext.user.token does not save the token correctly.

Note that in my LoginController where I handle the login: facebookContext.user.token shows the correct value but not in the other controllers. What happend here?

benorama commented 11 years ago

This is strange, but if this is the case, this is a bug. Token is put and cached into session the first time it is accessed, it should be accessible to all controllers. Do you use single app config (only one FB app) or multiple app config?

benorama commented 11 years ago

Do you have a minimal sample app to reproduce this issue?

confile commented 11 years ago

I use single app config. The error now disapeared may be this was my falt but I will inform you, if I get the same error again.