arsduo/koala — Issue #151: OAuthException: An active access token must be used to query information about the current user.
Author: sjoonk
Created: 2011-11-25 03:37:36+00:00
State: open

When I use Koala to access my facebook info on a canvas app, I got this error.

Here is my code snippet:

@oauth ||= Koala::Facebook::OAuth.new(FB_APP_ID, FB_APP_SECRET)
signed_request = @oauth.parse_signed_request(params[:signed_request]) rescue {}
if user_id = signed_request["user_id"]
@graph = Koala::Facebook::API.new(signed_request[:oauth_token])
@user = @graph.get_object("me")

When I use user_id instead of "me", it works well.
I don't konw what's wrong with this.

Any idea?