messenger

Facebook Messenger webhook source IP whitelist

感情迁移 提交于 2019-12-05 13:46:03
I am creating a chatbot on Facebook Messenger. I have configured a webhook which is working fine. Is there a way to get the list of source IPs to whitelist on my firewall? My security team is not comfortable in opening the webhook to the entire internet. We do plan to use the X-Hub HMAC validation, however restricting the source IP to a a finite number of IP or IP ranges or Domain would keep the security guys off me. Facebook publish their list of IP addresses via an endpoint that can be queried like this: whois -h whois.radb.net -- '-i origin AS32934' | grep ^route Note however that their IP

FB Messenger Message Template

穿精又带淫゛_ 提交于 2019-12-04 17:11:55
How can I achieve this template in fb messenger platform? It seems that the color of the shirt and the price are both subtitles of the message but there can only be 1 subtitle in a message. So how can achieve where there are two subtitles? This is my current message tempalate "message":{ "attachment":{ "type":"template", "payload":{ "template_type":"generic", "elements":[ { "title":"Classic T-Shirt", "image_url":"http://petersapparel.parseapp.com/img/item100-thumb.png", "subtitle":"Medium Grey %0D%0A s", "buttons":[ { "type":"web_url", "url":"https://petersapparel.parseapp.com/view_item?item

When and where to unregister messenger with mvvmlight

拜拜、爱过 提交于 2019-12-04 12:57:38
I build a project with mvvmlight. Using Messenger send message between VMs or VM and View. Now, I wonder that when and where to unregister messenger. Could u help me? Edited: This is my scene: There are a MainWindow and a ChildWindow, the ChildWindow (include a ContentControl consist of one of two different UserControl), change the ContenControl via a SwitchButton in ChildWindow. Every window or UserControl corresponding to a ViewModel. MainViewModel sends a message to MainWindow to open the ChildWindow ; MainWindow opens the ChildWindow (firstly use UserControlView1 , don't use

Facebook Messenger API - Persistent Menu not working on mobile

风流意气都作罢 提交于 2019-12-04 07:11:50
I am making a php curl call to the API endpoint to set up a persistent menu based on the documentation . Here is the code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/v2.6/me/thread_settings?access_token='.FB_ACCESS_TOKEN); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postbody); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); $output = curl_exec($ch); curl_close(

Fecebook Messenger Bot in PHP doesn't always respond to user

梦想与她 提交于 2019-12-04 04:34:06
问题 I have relatively simple Facebook Messenger bot in php for research purposes: $access_token = "xxxxxxx"; $challenge = $_REQUEST['hub_challenge']; $verify_token = $_REQUEST['hub_verify_token']; if ($verify_token === 'MY_VERIFICATION_TOKEN') { echo $challenge; } $input = json_decode(file_get_contents('php://input'), true); $sender = $input['entry'][0]['messaging'][0]['sender']['id']; $message = $input['entry'][0]['messaging'][0]['message']['text']; $url = 'https://graph.facebook.com/v2.6/me

Facebook Messenger Bot - How to disable bot and allow human to chat

旧时模样 提交于 2019-12-04 02:55:09
so this is something I've been trying to think through for about 16 hours. I am coding with PHP / CuRl / etc - the bot works and everything is fine. My current issue is figuring out how to disable the bot and allow a human to begin chatting with the customer/sender. Has anyone successfully, created a route for this ? I mean it's pretty hard from what I see, you'd have to disable etc etc. A lot of effort for my clients. Thanks for any input. Facebook has rolled out a "Handover Protocol" which is supposed to facilitate a combined human/bot Messenger implementation. https://developers.facebook

Facebook messenger checkbox plugin is hidden

空扰寡人 提交于 2019-12-03 18:53:21
问题 I'm trying to implement the new Facebook Checkbox plugin in a form but in a weird way I can't get it showing on the screen. So I don't get errors clientside but Iframe is hidden. Here's an simplified example of the code: <html> <head> <script> window.fbAsyncInit = function() { FB.init({ appId : '1815704925309469', xfbml : true, version : 'v2.6' }); FB.Event.subscribe('messenger_checkbox', function(e) { console.log("messenger_checkbox event"); console.log(e); if (e.event == 'rendered') {

Chatbot - generate page tokens for the pages you don't own using Facebook Login

自古美人都是妖i 提交于 2019-12-03 07:20:32
问题 Does anyone know how to install Facebook Chatbot on the page that you don't own? I have created a chatbot and want to allow other FB Page to install my chatbot app, I can generate page_access_token for the FB Page that I admin, but how to get the page_access_token for the FB Page that I am not the admin? Thanks! Joel 回答1: Based on my understanding of the docs, your Fb app needs to implement Facebook Login. The admin of the page will need to "login" to your app and grant your app access to the

Can you use Facebook “Test Users” to test a Messenger Bot?

自作多情 提交于 2019-12-03 06:38:28
问题 I'm currently trying to make a Messenger Bot with the Messenger Platform. I have a Facebook page, app, everything set up, it currently works when I (an admin for the app) message it. So, I made a few test users to test it with more users. But, whenever I login as a test user, I can't seem to message the page. As a test user, I can't access the page, and a direct Messenger link gives an "access denied" page. As an admin, I tried to add this test users as a "Tester" under the roles, but I also

Weird error with Facebook Messenger Platform/bot Welcome Confugration

本秂侑毒 提交于 2019-12-03 02:50:22
I'm getting a weird error while configuring welcome message for my Messenger bot. I've been using the same code (as shown below) and it has just been working fine until last night. I tried it with both cURL and Postman . Neither of them works. curl -X POST -H "Content-Type: application/json" -d '{ "setting_type":"call_to_actions", "thread_state":"new_thread", "call_to_actions":[ { "message":{ "text":"Welcome to My Company!" } } ] }' "https://graph.facebook.com/v2.6/<PAGE_ID>/thread_settings?access_token=<PAGE_ACCESS_TOKEN>" Error message when executing the code above: {"error":{"message":"(