Questions tagged [facebook-send-api]

32 questions
1
vote
0 answers

Find psid after clicking fb-send-to-messenger button

window.fbAsyncInit = function() { FB.init({ appId : 'app_id', autoLogAppEvents : true, xfbml : true, version : 'v3.2' }); FB.Event.subscribe('send_to_messenger', function(response) { if (…
1
vote
1 answer

facebook messenger send message api without the user initiating the chat

I have a facebook page, and a website too. I need to add a button to my website, like "SEND THIS ARTICLE ON MESSENGER". When the user clicks on it, I need to send the article data to the user on messenger. How can I achieve that?
1
vote
1 answer

Facebook Instant game bot message often results in "Cannot send Instant Game message to user at this time"

I'm making a Facebook instant game, and am sending myself test messages via the associated bot. It works. But not always, why? Very often I get this: { "error": { "message": "(#100) Cannot send Instant Game message to user at this…
1
vote
1 answer

Messenger chatbot send file

I'd like to send a file to the user, to do so I tried the request below, but it fails. The docs are not clear about wether is_reusable is compulsory, but the request fails with the same error, even if I include it. The download url works fine in a…
1
vote
1 answer

set json property depending on child property

I am creating this JSON object { "attachment": { "type": "template", "payload": { "template_type": "generic", "image_aspect_ratio": "square" "elements": [ new…
1
vote
0 answers

Facebook Send API 400 Bad Request

I'm trying to send a message from my app to a user using the Send API. I have the user_id from reading the userId when a message was sent to the page. However, when I try to send a message using the Send API I get the error: Failed calling Send API…
1
vote
1 answer

Facebook Messenger Chatbot messages tagging (of sorts)

I have a Facebook Messenger bot (written in NodeJS) and a separate control panel where a user can manage the information that the bot is working with (like inventory stock, etc.). One of those things is a log of all conversations between the bot and…
0
votes
1 answer

Facebook Messenger API can not send video attachment in Golang

I'm following this official Docs: https://developers.facebook.com/docs/messenger-platform/reference/attachment-upload-api/ to try to send a message with video attachment. What I've tried: //... api.BaseRoutes.Conversation.Handle("/video",…
0
votes
0 answers

How to align text in a message sent via Facebook's send api?

I can send messages to a messenger user successfully using this typescript function: import env from "env-var"; import superagent from "superagent"; import prefix from "superagent-prefix"; const PAGE_ACCESS_TOKEN =…
soufiane yakoubi
  • 861
  • 11
  • 31
0
votes
1 answer

Upload/Send file to Facebook via Send Api Reference using python requests

I am trying to upload a file to Facebook send API via python requests. Curl to send API request is as follows curl \ -F 'recipient={"id":""}' \ -F 'message={"attachment":{"type":"", "payload":{"is_reusable":true}}}' \ -F…
0
votes
2 answers

Not receiving the message sent by Facebook's Messenger platform by the SendAPI

So I have been following the Quick Start guide on Facebook's Messenger Platform. And everything runs perfectly. But, I am not receiving the message sent from the Messenger's SendAPI. The console log showed the message as sent, but I have not…
0
votes
0 answers

What is the alternative to Messenger Broadcast API (Deprecated) for Broadcast Messages?

I was previously using the Messenger Broadcast API to send regular updates to ALL users on my Facebook chat bot. These updates include daily news, feature updates etc. However now that the API is deprecated, I can't find any alternative API to do…
0
votes
2 answers

Facebook Send Api - reactivate webhook subscription

My server went offline for a day and now facebook has stopped sending requests to my webhook. This is the error message i get: Your Webhooks subscription for callback URL https://myurl has not been accepting updates for the past 0 minutes. This…
Pjotr Raskolnikov
  • 1,558
  • 2
  • 15
  • 27
0
votes
0 answers

Understanding sequential Promises with Bluebird Promise.each

I want to send an array of messages sequentially (in the same order of the given array) to the Messenger Send API. When I am sending two messages, like so: import Promise from 'bluebird'; const message1 = {...}; const message2 = {...}; const send…
DrDirk
  • 1,937
  • 3
  • 25
  • 36
0
votes
1 answer

Messenger Send API Error "The parameter "error":{"message":"(#100) For field 'messages': user_id is required"

I have the problem with Send API. I have tried to use POSTMAN, cURL to post the message to my messenger account. It works correctly with POSTMAN or cURL. However, I have built the Node.js to send the message. The error is " The parameter user_id is…