How to get the poster of a publication?

22 Views Asked by At

Actually, i'm getting the post_id of a facebook's post, and i'm searching to get the page who posts it. Does the functions "getParentId" return it?

1

There are 1 best solutions below

0
c-w On

According to the Facebook API documentation, the parent_id is "the ID of a parent post for this post, if it exists." As such, it's not what you're looking for.

You can get the id of the page to which a post belongs via facebook4j's getFrom method.

Graph explorer example:

postId=5281959998_10151166683754999
GET /v2.9/$postId?fields=from
{
  "from": {
    "name": "The New York Times",
    "id": "5281959998"
  },
  "id": "5281959998_10151166683754999"
}