0

I have an issue that I only have the post IDs of posts in my data repository. Since the Graph API I have to prefix the page ID before the post ID. Since I have no information what page posted this post I have a problem here.

I have my post IDs available but now need to know which post is allowed to get which post ID as prefix.

Therefore I'm looking for a way to give a post ID and receive the page ID.

Any API call that might give me that information actively or just a side-information?

xetra11
  • 7,671
  • 14
  • 84
  • 159

2 Answers2

0

I found this here:

https://graph.facebook.com/v2.8/139946919369293_811518108920728?access_token={token}&fields=from

?fields=from

does return this:

{
  "from": {
    "name": "Henkel Careers",
    "id": "301655703240307"
  },
  "id": "301655703240307_811518108920728"
}

Unfortunetly that does not make any sense especially in my case. Since the Graph API does ONLY allow {page_id}_{post_id} combinations you need to actually provide the page_id in order to receive the page id by the mentioned above request.

I hope somebody has another solution!

xetra11
  • 7,671
  • 14
  • 84
  • 159
  • You can only try and use a lower API version (if that is still possible for your app), so that you can request the details via the post id only, and get the page id that way. If that is not possible, then you are out of luck. – CBroe Oct 09 '16 at 11:13
  • Sadly I cannot use an older version. New apps arent allowed to use deprecated versions anymore – xetra11 Oct 09 '16 at 11:48
0

You can try using a users access_token to get a set of page_access_tokens - then you can try mapping to the data repository and give them the option of posting to these pages using these access tokens based on the return JSON object data.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433