I have the following permissions from the user in the app
[{"permission"=>"user_managed_groups", "status"=>"granted"},
{"permission"=>"email", "status"=>"granted"},
{"permission"=>"manage_pages", "status"=>"granted"},
{"permission"=>"publish_pages", "status"=>"granted"},
{"permission"=>"publish_actions", "status"=>"granted"},
{"permission"=>"public_profile", "status"=>"granted"}]
Now, when I try to publish anything on a group user manages, I get "Insufficient permissions"
I am using Koala gem to get this done as follows,
pry> client.put_connections(<<group_id>>, 'feed', message: 'Hi')
Koala::Facebook::ClientError: type: OAuthException, code: 200, message: (#200) Insufficient permission to post to target on behalf of the viewer [HTTP 403]
from /Users/Sagar/.rvm/gems/ruby-2.2.1/gems/koala-2.0.0/lib/koala/api/graph_api.rb:500:in `block in graph_call'
How can I make this work?
Ok! Got the answer of this one!
These permissions have one more aspect attached to them that is "App Visibility". If the app visibility is set of "Only Me", one will get the error "Insufficient Permission" even if all the permissions are granted.
To change the visibility, the user can go to the Settings -> Apps -> App Visibility and set it Public (preferably).