Get the facebook PSID without messenger extensions

倖福魔咒の 提交于 2019-12-24 08:26:55

问题


I'm working on a messenger bot and i have a web url that is a webview. For that part, with the Messenger Extension JS SDK, I manage to get the ID of the User.

But if the user is not on messenger and click on the link, I have no way to get the user PSID. The only way is to use account linking but it's not type "web_url".

How to pass the user PSID (or some parameters to have it) to page that user opens from the bot.

Any ideas ?


回答1:


As long as you know what user youre sending the url to, use query strings to pass parameters in the url.

Send the user to www.myurl.com/page?psid=USERPSID where you are passing the user id your bot has access to. Messenger extensions should not be necessary for this.

To use js to get the query params from the url from within the page your user ends up on, check out this question



来源:https://stackoverflow.com/questions/43998604/get-the-facebook-psid-without-messenger-extensions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!