A fangate is a method to check if user likes the page where the app is, if so, he can view the content.
I’ve been trying for a while to do a fangate with rest-graph gem.
rest_graph_setup(
:write_session => true,
:iframe => true,
:auto_authorize => true,
:auto_authorize_scope => 'email',
:app_id => ENV['FB_ID'],
:secret => ENV['FB_SC'],
:write_cookies => true,
)
raise rest_graph.get('me/likes/PAGE_ID').inspect
Thats the way I connect to the app and get, in theory, the status (/USER_ID/likes/PAGE_ID). But nothing happens, I got an empty array for a PAGE_ID I liked.
I also tried fql method
raise rest_graph.fql('SELECT uid FROM page_fan WHERE page_id=PAGE_ID AND uid=USER_ID').inspect
But again, I get an empty array.
So, any ideas for this?
Looks like you don’t have the
user_likespermission in the scope. Add it likeAnd that will probably solve your issue