agorapulse / grails-facebook-sdk

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

Renew access token? #62

Closed confile closed 11 years ago

confile commented 11 years ago

Does facebookContext.user.exchangeToken() renews the access token when it is expired?

I.e., when a user logges in after the two month period of the token validity do I get a new 2 month access token with this command?

benorama commented 11 years ago

Yes, it should exchange the current short-term token for a long-term one.

confile commented 11 years ago

@benorama This is not what I mean. Do I get a new token with that command?

benorama commented 11 years ago

The first time you call exchangeToken() during your session, it will exchange the default short-term token for a long-term one. So yes, you get a new token with that command : a long-life one (2 months) instead of the short-life one (2h).

confile commented 11 years ago

@benorama thanks