nov / fb_graph

This gem doesn't support FB Graph API v2.0+. Please use fb_graph2 gem instead.
MIT License
1.04k stars 191 forks source link

Posting on facebook page as a page #357

Closed roots-ai closed 10 years ago

roots-ai commented 10 years ago

Hi I followed the page management doc https://github.com/nov/fb_graph/wiki/Page-Management, and then tried to access the page_access_token but the "page.access_token" is coming out to be same as USER_ACCESS_TOKEN. I tried to post using

poster = FbGraph::Page.new(PAGE_ID, :access_token => USER_ACCESS_TOKEN).fetch

poster.feed!(:message => 'message to show', :picture => 'picture_urlr', :description => 'like duration etc', :link => 'link_to_url')

which posts on the page but as the user.

Also the 'posts.first.publish!' as giving in the docs, gave the error that this "User doesn't has access to publish".. Also there is no option give in the docs on how to publish a specific content..It just says posts = page.promotable_posts..

I searched and found many people going through the same problem, and I added the following permissions 'manage_pages, status_update, publish_actions', but this didn't work for me, even though these permissions were asked during authentication.

Please get this sorted out.

roots-ai commented 10 years ago

this did it for me page = me.accounts.detect do |p| p.name == "FBGRAPH" end page.feed!( :message => 'Trying FbGraph::Page#feed!' )