0

I've created many business/company pages in Facebook. But regularly Facebook unpublishes them.

I'd like to check whether a page is unpublished using some script on Linux which can notify me.

How can I do it?

There is related thread: Facebook API: Determine if Facebook Page is published / unpublished and curl command mentioned does not seem to be working correctly when I tried on my Linux command prompt.

Community
  • 1
  • 1
AgA
  • 2,078
  • 7
  • 33
  • 62
  • 1
    _“But regularly Facebook unpublishes them”_ – my guess would be, that there’s a _reason_ for that …? Maybe better if you tried not to violate their policies/TOS in the first place. – CBroe May 26 '14 at 13:00
  • After publishing again without changes it works fine for many days. Sometimes it is unpublished for inactivity. – AgA May 26 '14 at 13:21

2 Answers2

0

First of all, you'll need a User Access Token with manage_pages permission. Then, you should be able to do the following:

 curl -4 "https://graph.facebook.com/fql?q=SELECT%20page_id%2C%20name%2C%20username%2C%20is_published%20FROM%20page%20WHERE%20page_id%20IN%20(SELECT%20page_id%20FROM%20page_admin%20WHERE%20uid%20%3D%20me())%20AND%20is_published%3D0%20ORDER%20BY%20fan_count%20DESC&access_token={user_access_token}"

and replace {user_access_token} with your actual User Access Token.

Tobi
  • 31,405
  • 8
  • 58
  • 90
0

Call https://graph.facebook.com/PAGE_ID and check, if a "Unsupported get request" is returned. If yes, then it can be, that the page is unpublished.

This attempt is not going to work for age-restricted pages! They always return "Unsupported get request" when calling the Graph API endpoint with no access token.

Johannes N.
  • 2,364
  • 3
  • 28
  • 45