I need to check if the messenger user already has an existing account to my website before they can proceed to a certain action in the app.
In my website, a user can login via Facebook then after their first successful login, their facebook id is saved to the database. Now, the same user logs in to messenger and interacts with my bot, but the problem is, the ids returned by messenger and facebook are totally different although they are the same user.
I have read the documentation but still, I can't fully understand how it works.
Have modified the code on glitch to support account_linking please check : https://glitch.com/edit/#!/violet-pyramid?path=bot.js:20:0
hope this helps