質問

Facebook realtime docs specify that the callback data is of the following format

{
  "object": "user",
  "entry": [
    {
      "uid": 1335845740,
      "changed_fields": [
      "name",
      "picture"
      ],
     "time": 232323
    }, {
      "uid": 1234,
      "changed_fields": [
      "friends"
      ],
      "time": 232325
}]}

If two different objects, say 'user' and 'page' are to be sent back, does facebook

  • Batch them together?
  • Send them separately?
役に立ちましたか?

解決

Different objects are sent in different requests. But if there are many user requests then it will batch those user requests and send it. And also you can have different end points for user and page. The format of page request is also different. It looks something like this

{
    "object": "page",
    "entry": [
        {
            "id": "408518775908252",
            "time": 1360643280,
            "changes": [
                {
                    "field": "feed",
                    "value": {
                        "item": "like",
                        "verb": "add",
                        "user_id": 5900878
                    }
                }
            ]
        }
    ]
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top