I'm using Koala gem on on Ruby on Rails application
And I have the following code on the model I'm using to the the data through Koala:
@graph = Koala::Facebook::GraphAPI.new(token_secret)
friends = @graph.get_connections("me", "friends")
where token_secret comes from a field of my users table, saved on the login.
It works fine but after a couple minutes I get:
Koala::Facebook::APIError (OAuthException: Error validating access token: Session has expired at unix time 1327438800. The current unix time is 1327442037.):
I found the way to renew this token in the front with the methods from the Facebook JS SDK but this method where I'm getting the list of friends is called on the controller.
How can I renew the token_secret using Koala? is this possible?