Share content from your Messenger bot

(Ryan McGuinness) #1

You can share content from your Messenger Bot with Messenger users, in a well-presented format.

Install the flow and try it for yourself. :thumbsup:

You just need to add your page access token and don’t forget to change the ā€˜Title’ and ā€˜Sub-title’ text in the webhook. You can even add your own image if you change the ā€˜Image_url’. :smiley:

2 Likes
Facebook APIs in cards
(Rami Segal) #2

This works theory. The recepient will get the exact bubble you shared. However, there is no action allowing the recepient to click the bubble and install the bot.

(Kellsey Shaw) #3

Hi Rami,

When the user clicks the bubble, it opens a conversation window to the bot so that the user can start a chat with it :slight_smile:

(Kellsey Shaw) #4

Hi Rami,

Sorry for the confusion. The example flow was for the purpose to show you how to share content, which is what it does but it just needs a little more to share your bots properly.

If you replace the body of the webhook in your flow with the following and insert your content and bot URL’s where indicated. You can get your bot URL from the bots page of your Flow XO account. When you edit them it’s given on the last page of the popup.

{ "recipient":{ "id":"{{bot_new_message.user_id}}" }, "message":{ "attachment":{ "type":"template", "payload":{ "template_type":"generic", "elements":[ { "title":"Your Title", "subtitle":"Your Subtitle", "image_url":"Your Image URL Here", "item_url":"Bot URL Here", "buttons":[ { "type":"element_share" }, { "type":"web_url", "url":"Bot URL here", "title":"Chat to Bot" } ] } ] } } } }

(Anish Duggal) #5

@kellseyshaw

Hi Kellsey,

I was able to get the share working as per your code above and it works great, thank you.

I was wondering if there was a way to find out if the user actually shared (not just clicked the share button) content to 1 or more of their contacts?

Thanks

(Rodrigo Fuentes) #6

Hi! Im getting the following error, any ideas on what it may be?

Thank you,

Status Code
400
Body
{ā€œerrorā€:{ā€œmessageā€:"(#100) No matching user found",ā€œtypeā€:ā€œOAuthExceptionā€,ā€œcodeā€:100,ā€œerror_subcodeā€:2018001,ā€œfbtrace_idā€:ā€œC3UIsQyJEIlā€}}
Data
{
ā€œerrorā€: {
ā€œmessageā€: ā€œ(#100) No matching user foundā€,
ā€œtypeā€: ā€œOAuthExceptionā€,
ā€œcodeā€: 100,
ā€œerror_subcodeā€: 2018001,
ā€œfbtrace_idā€: ā€œC3UIsQyJEIlā€
}
}

(Karen Barker) #7

Hi Rodrigo,

It looks like the User ID being sent is incorrect.

If you’d like us to take a closer look at this then please contact us at support@flowxo.com and if you can please share your flow and full expanded logs with us then that would really help. :slight_smile:

(Mayank Sharma) #8

Hi @KarenBarker,

I’m facing the same error. checked the user ID & Header is also the right i.e, Content-Type : application/json…Even then it shows the same error.

(Karen Barker) #9

Hey @mayank_sharma :wave:

If you can send a screen shot of both your interactions and the setup of your webhook to support@flowxo.com then we’ll happily take a look at what is going wrong. :thumbsup: