如何使用考拉宝石从 facebook 获取当前用户 ID?
def UserDetailsfb
@user_id = current_user.id.to_s
utility = Utility.new
par = Hash.new
utility.request = par
@fb_uid = Account.find_by_id(6)
@fb_code = @fb_uid.auth_token
@fbuid = @fb_uid.uid
@graph = Koala::Facebook::GraphAPI.new(@fb_code)
@graph = Koala::Facebook::API.new(@fb_code)
tweet_array = []
@response = @graph.get_object(id);
render :json => { :tweetArray => @response }
end
我需要获取当前的用户 ID。显示错误“未定义的局部变量或方法 `id' for #”