开发者

Can't subscribe to page's likes through Real-time updates API

I am trying to get updates when the like count of a page my app is on is updated. I am trying to accomplish this by using the FB Real-time Updates API

When I do a POST, with the object = "page" and the fields = "likes", I get a 400 error with the message '"likes" is an invalid field name'.

object = "page" and the fields = "name" works fine.

The documentation states you are allowed to subscribe to any public attribute.

For those playing the home game, here are the steps to reproduce the problem:

  1. Get an OAuth token for your app:

    https://graph.facebook.com/oauth/access_token?client_id=<app_id>&client_secret=<secret>&grant_type=client_credentials

  2. Post to subscription URL:

    https://graph.facebook.com/<app_id>/subscriptions

POST Variables:

'access_token' => `<access token from step 1>`,
'object开发者_运维问答' => 'page',
'fields' => 'likes',
'callback_url' => `<a callback url>`,
'verify_token' => 'testingstring123'


This isn't supported - from the section 'Real-time Updates' on https://developers.facebook.com/docs/reference/api/page/ :

The Page object supports Real-time Updates for picture, tagged and checkins connections.

Note: Real-time updates are not yet supported for the total number of Page checkins.


Subscribing to likes is only for pages that a user likes. The 'likes' object is what pages a user or page likes, not the count of how many people like your page, which cannot be subscribed to.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜