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.
How to check the facebook application permission for specific user through graph api in rails?
Asked Answered
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
That's half of it but how do you tell Koala to request certain permissions from the user when they authorise the app? –
Indrawn
You must autorize user with publish_stream permission. In rails I do it with OmniAuth gem.
My post can help you - Publish stream in Facebook & Twitter with OmniAuth
The scenario is the user has authorize the app. I want to check if the user given certain permission to my app. if not I want to take that permission. Is this possible in facebook graph API or in rails 3. My app is running in facebook canvas. –
Oldcastle
You can use FQL query to check permission –
Unbroken
If you don't use Koala you can send request 'GET /{user-id}/permissions' This is described in 'Checking Current Permissions' section here https://developers.facebook.com/docs/facebook-login/permissions/v2.1
© 2022 - 2024 — McMap. All rights reserved.