facebook-messenger-bot

Getting ids_for_pages from Graph returns empty

…衆ロ難τιáo~ 提交于 2020-03-03 07:58:27
问题 I'm having some trouble connecting people across apps and bots in messenger. https://developers.facebook.com/docs/messenger-platform/connecting-accounts I've already associated my developers facebook app (with a Facebook log in and Messenger Products) in Business, as well as the page. My objective is in my server being able to identify the messenger user with the log in user in the app. So when the user would go to the messenger would have the same experience as in the app. The trouble is:

Facebook messenger bot error Unexpected token ' in JSON at position 0

旧街凉风 提交于 2020-02-25 06:10:09
问题 I'm trying to create a Facebook messenger bot using NodeJS and Express. I'm following the facebook guide and when I tried to run this command curl -H "Content-Type: application/json" -X POST "localhost:4000/" -d '{"object": "page", "entry": [{"messaging": [{"message": "TEST_MESSAGE"}]}]}' I have got this error SyntaxError: Unexpected token ' in JSON at position 0 Here is my code: var express = require('express'); var bodyParser = require('body-parser'); var request = require("request") var

How to make a carousel image clickable in Botframework version 4

早过忘川 提交于 2020-01-16 09:35:28
问题 I am using hero card to display a list of carousels on FB messenger. I want to put an url link behind the image I am displaying so that when user selects the carousel he is redirected to the payment page. How to achieve this with the latest Botframework v4. In version 3 Action types included OpenUrl. but in V4 I didn't found a way to this in the docs. Kindly Help. I am adding my code here. // Create the hero cards. Add the carousels to it. var heroCard = new HeroCard { Title = "We are a

Dialogflow messenger-referrals

对着背影说爱祢 提交于 2020-01-15 09:33:11
问题 I'm trying to get the GET_STARTED payload with reference parameters firing to my chatbot running on a node express.js instance. If I do a get started with refereral call with no active conversation thread, I can access the parameters no problem. The issue is, however, if I click on a referral link with a conversation thread with my bot already open. I get no post to my fulfillment server. I have enabled messaging_referrals within the facebook developer console, is there some Intent or Event I

FB Messenger Bot: Webhook updates not being delivered

不想你离开。 提交于 2020-01-14 06:47:09
问题 i am working with Facebook Checkbox Plugin everything is working fine except facebook is not sending request to my webhook url when Confirming Opt-in. in facebook docs it is mentioned that After the opt-in event, we will post a webhook event to your server if the checkbox state was checked. This callback has the same format as the opt-in callback, but instead of a sender field, it has an optin object with a user_ref field. But it is not sending any data. here is my webhook code if (!empty($

FB Messenger Bot: Webhook updates not being delivered

会有一股神秘感。 提交于 2020-01-14 06:47:08
问题 i am working with Facebook Checkbox Plugin everything is working fine except facebook is not sending request to my webhook url when Confirming Opt-in. in facebook docs it is mentioned that After the opt-in event, we will post a webhook event to your server if the checkbox state was checked. This callback has the same format as the opt-in callback, but instead of a sender field, it has an optin object with a user_ref field. But it is not sending any data. here is my webhook code if (!empty($

Facebook Messenger Chatbot for personal fan page

╄→гoц情女王★ 提交于 2020-01-11 10:55:28
问题 I created a chatbot using Dialogflow, hooked it up as a facebook messenger chatbot for my personal fan page (A fan page for my app). I passed through the first review process and it got approved. The next step is to "verify my business". I am not a business, I am just an individual developer, and I wanna allow my facebook fan page to have a chatbot that can interact with the users. I don't have a "bill" that shows my business cause I don't have on. How do I go about that, how to enable the

how to turn off automatic replies?

≡放荡痞女 提交于 2020-01-07 08:35:15
问题 My bot has an option "notify". I would like to stop automatic replies for that user if "notify" has been hit. Is that possible ? Any example ? PS: I know this question is not asked properly, but i don't know where to start. 回答1: If you want to stop displaying in the conversation what the user selected from a set of options, you can set the CardAction type to PostBack . eg. CardAction CardButton = new CardAction() { Type = ActionTypes.PostBack, Title = item.ToString(), Value = item.ToString()

Webhook Global Variable

人走茶凉 提交于 2020-01-05 04:43:32
问题 I have created a node.js webhook for my facebook messenger bot. The bot is built in dialog flow and the database is connected to firebase. My question when a function is invoked in the webhook to log in, after logging in, I get a userID from the database, which I want to store it somewhere in the code so that userID info is available throughout the user session. I am storing it in a global variable. However, this works fine if only one user is using the bot. If another user is using the bot

uploading mp4 video using curl to facebook

╄→гoц情女王★ 提交于 2019-12-25 00:23:26
问题 I have a simple bot in my facebook website, I want to upload mp4 video so that I can use it to my bot according to this doc upload via url here is what I have done so far. curl -X POST -H "Content-Type: application/json" -d '{ { "message":{ "attachment":{ "type":"video", "payload":{ "is_reusable": true, "url":"https://cdn-b-east.streamable.com/video/mp4/ll7ht.mp4?token=3Oue4umXi5OZYxVcpgh61w&expires=1546136854" } } } } }' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=MY