0
votes

I have been trying to build a bot with Facebook Messenger. I want to do the handover protocol but it is not working as expected. First I can't find much documentation online on the PSID. Following this link and looking at the curl command below, I can't seem to find the PSID. Is PSID the user ID associated with a particular page and if so where can I find it manually. I have looked at Business Settings and that the "Facebook Page" and "App" must be tied to the same company before it can work and I have already done so.

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{"id":"<PSID>"},
  "target_app_id":123456789,
  "metadata":"String to pass to secondary receiver app" 
}' "https://graph.facebook.com/v2.6/me/pass_thread_control?access_token=<PAGE_ACCESS_TOKEN>"

Let's say even if I can do it via curl and I want to automate this with code, my Messenger is integrated with IBM Watson Assistant, and there doesn't seem to be a way where you can do something like FacebookResponse.PSID and pass the PSID to any sort of backend code powering the Watson Assistant.

Would appreciate if anyone can help. Thanks!

1

1 Answers

0
votes

From your posting I take it that you have a Watson Assistant dialog, which you would like to connect to Facebook messenger?
If this is the case, the Facebook skill integration will perform this task. Its also well documented on how to connect the two. You need to create a Facebook "App", along with its own Facebook page. The required settings for Facebook will be detailed on this setup page. Follow the instructions found here.
https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-facebook