facebook messenger - close webview and notify webhook

前端 未结 1 661
故里飘歌
故里飘歌 2021-01-20 09:27

I\'m sending the user from the messenger chat to a payment page in my application. Messenger opens the page in a webview. Now I\'d like to close the webview and send the us

1条回答
  •  不知归路
    2021-01-20 09:53

    You can only achieve this if the payment page is controlled(developed by you), if it is a third party payment gateway there is nothing you can do. if the payment page is controlled by you, you can pass the sender ID as a parameter via web_url or get the sender ID via

      
    

    using the sender ID you can then send a message text back to the bot. to close the webview after all of this include this script after sending the text to the bot

       
    

    Just like from within your Bot you have to ensure that the page access token is available before you send the text, also ensure that you whitelist the domain used in you webview and you set "messenger_extensions": true, in your web_url button or you won't be able to get the Sender ID using messenger Extension

    references

    url button

    messenger extension

    0 讨论(0)
提交回复
热议问题