facebook-messenger

How can a bot receive a voice file from Facebook Messenger (MP4) and convert it to a format that is recognized by speech engines like Bing or Google?

拈花ヽ惹草 提交于 2019-12-06 12:48:36
I'm trying to make a bot for Facebook Messenger using Microsoft's Bot Framework that will do this: Get a user's voice message sent via Facebook Messenger Convert speech to text Do something with it There's no problem with getting the voice message from Messenger (the URL can be extracted from the message the bot receives), and there's also no problem with converting an audio file to speech (using Bing Speech API or Google's similar API). However, these APIs require PCM (WAV) files, while Facebook Messenger gives you an MP4 file. Is there a popular/standard way of converting one format into

FB Messenger Message Template

自作多情 提交于 2019-12-06 11:50:14
问题 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

Are bots for Workplace by Facebook supported via the Facebook channel on Microsoft Bot Framework?

情到浓时终转凉″ 提交于 2019-12-06 07:22:37
I am trying to connect my bot on the Microsoft Bot Framework to a Work Chat Bot on Workplace by Facebook. Everything appears to work the same as the regular Facebook Messenger channel: I can validate my Facebook Messenger credentials in Botframework (page id, app id, app secret, page access token) The Botframework webhook works in my Workplace custom integration settings I can find my bot in Work Chat and send it messages All the regular Messenger API calls work normally (e.g. setting persistent menus) No issues appear in the Bot Framework management console However, the bot never answers. Am

Facebook messenger bot error nonexisting field (messages)

☆樱花仙子☆ 提交于 2019-12-06 06:04:43
I am a new member. I have an error when send message using HTTP Post to "graph.facebook.com/v2.11/me/messages?access_token=MY_PAGE_TOKEN" This is error return: `{"error":{"message":"(#100) Tried accessing nonexisting field (messages) on node type (Page)","type":"OAuthException","code":100,"fbtrace_id":"EB39Xkxnf6O"}}` Despite error, tester and developer still able to receive message. But the FB viewer might not and they not approve my review submission: "We did not receive an automated response when we messaged your Page. Bots should respond to all input from the user within 30 seconds so that

Messenger Bot Fails to Respond

徘徊边缘 提交于 2019-12-06 03:44:21
My bot has been approved and is available publicly (see image) , but it does not respond to anyone besides the developer. I have it hosted on Heroku. I have tried to debug it with a ton of console logs, and I have realized that it doesn't log the "Enter App.Post" (see below) when any one other than the developer sends it a message. Has anybody else experienced this behavior? /// Facebook verification app.get('/webhook/', function (req, res) { if (req.query['hub.verify_token'] === '***************') { res.send(req.query['hub.challenge']) } res.send('Error, wrong token') }) /// Star up the

Facebook Messenger API - Persistent Menu not working on mobile

淺唱寂寞╮ 提交于 2019-12-06 02:57:45
问题 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

Decode or unescape \u00f0\u009f\u0091\u008d to 👍

天涯浪子 提交于 2019-12-06 02:21:54
问题 We all know UTF-8 is hard. I exported my messages from Facebook and the resulting JSON file escaped all non-ascii characters to unicode code points. I am looking for an easy way to unescape these unicode code points to regular old UTF-8. I also would love to use PowerShell. I tried $str = "\u00f0\u009f\u0091\u008d" [Regex]::Replace($str, "\\[Uu]([0-9A-Fa-f]{4})", ` {[char]::ToString([Convert]::ToInt32($args[0].Groups[1].Value, 16))} ) but that only gives me ð as a result, not 👍. I also tried

Python requests response encoded in utf-8 but cannot be decoded

回眸只為那壹抹淺笑 提交于 2019-12-06 01:07:26
问题 I am trying to scrape my messenger.com (facebook messenger) chats using python and i have used google chromes developer tools to see the POST request for the chat history and i have copied the entire header and body into a format that requests can use. I get HTTP code 200 implying the request at least got something but and i can print res.encoding to get the encoding it returned in which it says is utf-8. But i cannot decode it! here is the function: def download_thread(self, limit, offset,

how to setup “Get started” button in facebook messenger bot and when to send welcome message

我的未来我决定 提交于 2019-12-05 18:41:09
问题 "Get Started" tried sending request to this url https://graph.facebook.com/v2.6/PAGE_ID/thread_settings?access_token=PAGE_ACCESS_TOKEN But didn't work. 回答1: Make a POST call to API JSON body as below. curl -X POST -H "Content-Type: application/json" -d '{ "setting_type":"call_to_actions", "thread_state":"new_thread", "call_to_actions":[ { "payload":"USER_DEFINED_PAYLOAD" } ] }' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN" Ref: Facebook messenger get

Facebook Messenger API “URL COULD NOT BE VALIDATED”

六月ゝ 毕业季﹏ 提交于 2019-12-05 16:43:03
问题 I'm trying to setup the Facebook messenger API and I'm getting this error when I attempt to add the WebHook: The URL couldn't be validated. Callback verification failed with the following errors: curl_errno = 60; curl_error = SSL certificate problem: unable to get local issuer certificate; HTTP Status Code = 200; HTTP Message = Connection established I've setup my NodeJS server using the code they provided in the tutorial. Here's the url: https://stackoverload.me/chatter/webhook EDIT HERE'S