I hope to retrieve the info from facebook inbox through the open api but failed

52 Views Asked by At

I hope to retrieve the info from Facebook inbox through the open API but failed. I try to run the url in Graph API explorer

481315825357933?fields=attachment

Result is:

{
  "error": {
    "message": (#100) Unknown fields: attachment.,
    "type": OAuthException,
    "code": 100
  }
}

Then I also run the FQL:

SELECT message_id, thread_id, author_id, body, created_time, viewer_id, attachment FROM message WHERE thread_id = 481315825357933

And got the result as:

{
  "data": [
    {
      "message_id": "481315825357933_1435213395",
      "thread_id": "481315825357933",
      "author_id": "10153118278408579",
      "body": Print it!,
      "created_time": 1435213395,
      "viewer_id": "1595482814036523",
      "attachment": [
      ]
    },
    {
      "message_id": "481315825357933_1435213454",
      "thread_id": "481315825357933",
      "author_id": "10153118278408579",
      "body": Print it.,
      "created_time": 1435213454,
      "viewer_id": "1595482814036523",
      "attachment": {
        "media": [
        ],
        "name": ,
        "caption": ,
        "description": ,
        "properties": [
        ],
        "fb_object_type": ,
        "fb_object_id": "",
        "icon": https://fbstatic-a.akamaihd.net/rsrc.php/v2/yD/r/aS8ecmYRys0.gif,
        "tagged_ids": [
        ]
      }
    }
  ]
}

Is the attachment info forbidden from Facebook API?

Thanks beforehand.

1

There are 1 best solutions below

0
On

There's an attachments edge on the message level: /{message-id}/attachments