Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check the facebook application permission for specific user through graph api in rails?

I want to check whether the user has give publish_stream permission to my application or not. If not want to get publish_stream permission.

like image 462
AliZubi Avatar asked Nov 17 '11 12:11

AliZubi


1 Answers

if you are using the Koala Gem just use:

#check wether wallpost is allowed
permissions = graph.get_connections('me','permissions')
@has_wallpost_permission = permissions.select{|o| o['permission'] == 'manage_pages'}.length == 1 
like image 172
Karl Adler Avatar answered Sep 27 '22 23:09

Karl Adler