You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require'fb_graph'permission_candidates=[:email,:sms,:read_stream,:publish_stream]permissions=FbGraph::Query.new("SELECT #{permission_candidates.join(',')} FROM permissions WHERE uid = me()").fetch(:access_token=>ACCESS_TOKEN)permission_candidates.eachdo |candidate|
answer=casepermissions.first[candidate]when0"YES"when1"NO"endputs"Has #{candidate} permission? => #{answer}"end
Multi Query
FbGraph::Query.new({:query1=>'SELECT uid FROM user WHERE uid = me()',:query2=>'SELECT name FROM user WHERE uid = me()',}).fetch(:access_token=>ACCESS_TOKEN)# => {"query1" => [{"uid" => 579612276}], "query2" => [{"name" => "Nov Matake"}]}