FbGraph2 and getting post form company site

90 views Asked by At

I have problem to get post from company profile (site) on facebook. I use fb-graph2 gem

page = FbGraph2::Page.new(fb_page).authenticate(fb_access_token)
        feed = page.fetch.feed

But the problem is that this script get all posts from the wall - those that are written by the company (site) owner and those posted by ordinary users. Can you download only posts written by the owner site ?

1

There are 1 answers

0
Dima I. Belinski On
feed = page.fetch(fields: 'from').feed

curl -i -X GET \
 "https://graph.facebook.com/v2.11/{page_id}/feed?fields=from&access_token=access_token"

This will return posts from feed with author id which you can check if it's equal with owner id.