2

I set up a Facebook Webhook to notify my app of changes to my business page. Then I did the same with the Messenger platform. Then when I started posting as a user of my page, and sending messages, I found out that the user IDs are different across different pages and apps.

So, facebook provides two endpoints: ids_for_apps, and ids_for_pages. There are quite a few "but"s to use these endpoints, but at least in development mode, and for IDs sent by the Messenger webhook, it works. I get the notification and I'm able too look up the IDs and match to an app id (because maybe the user commented on a photo before contacting me via Messenger)

Now if I try to do the same with a sender_id that I got from the Facebook Webhooks, "feed" subscription, I get the "singular links API is deprecated for versions v2.4 and higher"

The url I try to access, even with Graph API Explorer tool is GET /2.9/{sender_id}/ids_for_apps

What's going on here?

hjf
  • 453
  • 5
  • 16
  • 2
    You should only get that message if you are trying to access a post object using its own id only (https://stackoverflow.com/q/31353591/1427878), I don't see that making sense when you try to access a user object. Are you sure you did treat the values properly - no cut-off due to wrongly parsing the JSON (ids as numbers, instead of strings), which could lead to an altered id (that then might refer to the wrong object) ...? – CBroe Jun 11 '17 at 11:12
  • ... http://i.imgur.com/bCcXe0F.png – hjf Jun 11 '17 at 14:32
  • If you are using PHP's `json_decode` here by any chance, make sure to pass in the option flag `JSON_BIGINT_AS_STRING` ... if you are using any other language/JSON decoder, go check whether that provides a similar option. – CBroe Jun 11 '17 at 14:38

0 Answers0