Closed Goltergaul closed 11 years ago
passing the access token as :access_token => "token" fixes the issue. please update the gist in the wiki.
notifications = FbGraph::Query.new(
"SELECT notification_id, sender_id, title_text, body_text, href, object_id, object_type
FROM notification
WHERE recipient_id=#{fb_uid} AND is_unread = 1 AND is_hidden = 0"
).fetch(:access_token => fb_user.access_token)
Thanks for your report. I just updated the wiki. https://github.com/nov/fb_graph/wiki/FQL
i've got this query:
and it throws the following error:
TypeError: can't convert Symbol into Integer from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/query.rb:24:in
[]' from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/query.rb:24:in
build_params' from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/query.rb:12:inblock in fetch' from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/query.rb:30:in
block in handle_response' from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/node.rb:123:inhandle_response' from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/query.rb:29:in
handle_response' from /home/gaul/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/fb_graph-2.7.0/lib/fb_graph/query.rb:11:in `fetch'I did some debugging in the query class, the instance looks like this (access_token missing)
instead the acces_token is directly passed as the params argument in, which results in the error above on params[:access_token]: