Dave2081
Dave2081

Reputation: 339

Facebook Open-Graph API Subscription or Update Notification without App Permission

I'm relatively certain after reading the facebook Open Graph documentation that I can't have a web site 'subscripe' to a public page, unless that page installs my app. Let me know if that is wrong.

What I am trying to make is a photo gallery, pretty simple, but it grabs photos from a public 'page' such as a college or university.

I would like it to update itself anytime there is a change. I was hoping I could do it through the API, possibly using API updates/subscription

Facebook App Subscriptions -

but I don't think that will work. I'm using PHP, are there other ways to listen and see if there has been a change? Other than just firing off a function every now and then, using CRON or some other such server tool. I would think that facebook would probably also not like that behavior, though I'm not sure.

As of right now, I am able to grab JSON from a public page's photo gallery using the API and the photo gallery works just fine, I'm mostly just wondering what the optimal of having it update itself automatically is.

Upvotes: 1

Views: 344

Answers (2)

Doaa Magdy
Doaa Magdy

Reputation: 526

you need to get page access token, which is granted when the user is one of the Page Admin, check the documentation on Facebook

https://developers.facebook.com/docs/graph-api/reference/page

look for this line

"access_token": "The access token you can use to act as the Page. Only visible to Page Admins"

Upvotes: 0

C3roe
C3roe

Reputation: 96151

You are correct in assuming that real-time updates for pages require admin access to the page to work. You need a page access token to be able to subscribe to updates for a specific page, and such a page access token you can only get from users that have admin privileges for that page. (The page does not need to install your app as a tab any more, they changed the subscription process in that regard; but the page access token is still necessary. Basically you can say, you can not subscribe to updates for just any arbitrary page, it has to be “your” page.)

Apart from that, all you can do is check for new content by requesting the current data in a sensible interval.

Upvotes: 4

Related Questions