I'm writing a facebook app in Scala and Play!. I want real time updates for user feed and feed of pages this user administers, so I subscribed to those. This is what comes back from GET /{my_app_id}/subscriptions:
{
"data": [
{
"object": "user",
"callback_url": "***",
"fields": [
"feed"
],
"active": true
},
{
"object": "page",
"callback_url": "***",
"fields": [
"feed"
],
"active": true
}
]
}
My server receives updates about the feed of the user that uses my app (including when he posts on his page's wall as himself), but no updates about posts made by the page he administers. The application is granted read_stream, user_status and manage_pages permissions. The question is can I get page feed updates without having the user add my app as a tab to his page? My app is not meant to be used as a tab app.
Short survey to show I actually did my homework: here the support engineer says it is possible, although it is unclear how to "use a Page Access Token tied to the both the Page and app when creating the subscription". On the other hand, here CBroe says one has to add app as a tab. Here Caroline suggests to create a tab and delete it immediately, which looks ugly. I tried to add my app as a tab without prompting the user, like this, with the Graph API Explorer and got "Application does not have permission for this action".
To get a list of wall stream items, do an HTTP Get to http://graph.facebook.com/me/wall?access_token=ValidUserAccessToken for the current user. To get a list of home feed stream items, do an HTTP Get to http://graph.facebook.com/me/home?access_token=ValidUserAccessToken for the current user.
In the newest version of the Graph API (v2. 9), we're announcing features that simplify development, making it even easier to build apps and experiences with Facebook. We're providing free access to over 140 million places around the world, the same data that powers Facebook, Instagram, and Messenger.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
The truth lies in the middle: one has to make a POST to https://graph.facebook.com/pageId/tabs?app_id=appId&access_token=page_access_token to get real time updates for the page, but this does not seem to add an app as a tab, the app just shows up among added apps in page settings. I did the POST through Graph API explorer to debug my update processing code, and the updates get to the server OK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With