1

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 ?

Mystyroi
  • 11
  • 6
  • 1
    If you send the URL to the user(?), then where is the problem with appending whatever parameters you need before you do so? – CBroe May 16 '17 at 10:42
  • The bot send a button web url to the user. If he's on messenger, it opens a webview and i can use the Messenger Extensions SDK to get the PSID. But if the user is not on messenger app, the messenger extension SDK will not work. So how to deal with it ? is there is a solution ? – Mystyroi May 16 '17 at 10:51
  • Ok i think I got it. Thank you, just to append the parameters of my choice when sending the URL buttons. Thanks ! – Mystyroi May 16 '17 at 10:53
  • How did you get the user ID? I'm able to get it from Messenger mobile app. But it's not working in Desktop! – Gijo Varghese Aug 04 '17 at 04:27

1 Answers1

0

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

Community
  • 1
  • 1
Jon Church
  • 2,320
  • 13
  • 23