facebook-messenger

Facebook Messenger API:how to break line in a message

流过昼夜 提交于 2019-11-29 05:37:09
In Facebook Messenger chat,we can break a line by press "SHIFT+ENTER". So how to break line by Facebook Graph API(Messenger API). I've seen in a few answers that the Graph API accepts <center></center> instead of <br> and some other parts of their API seem to accept \r\n . Is there currently any way of sending a line break and if there is where it it documented? If you are using php, You should be use chr(10) . Its working as like '\n' or '<br>' . Also you can use <center></center> . Its working for me. tyrex Turns out Line break in Facebook status update via Graph API might give you what you

Why is hardware acceleration not working on my View?

你。 提交于 2019-11-29 02:54:32
问题 I'm using Facebook's Rebound library to replicate the bouncy animations seen in their chat heads implementation. The problem is, most of the time the animation stutters. A few pictures will explain this better. Here's the buttery-smooth chat heads animation: And here's my attempt (notice how the animation for the white View skips nearly all frames): Once in a while it works smoothly: Below is the code I'm using currently (the entire project is up on Github if you want to set it up quickly). I

Microsoft Bot Framework messages with buttons in Facebook Messenger

别来无恙 提交于 2019-11-29 00:37:56
I'm working on a bot using the C# Microsoft Bot Framework and I'd like to send messages with action buttons to Facebook Messenger. I've successfully created the bot, deployed it and can communicate with it through Messenger and am now trying to refine the appearance of the bot's responses. I have been able to create single cards and carousels by putting the card info into Message.Attachements but I'd like to also include action buttons. The Messenger Platform docs describe button and "generic" templates in their Send API Reference but for the life of me I can't figure out how to coerce the Bot

How to send location from Facebook messenger platform?

≡放荡痞女 提交于 2019-11-28 21:35:36
There is a way to send my location to facebook-messenger from a mobile client, but how can I send some location from a bot? (messenger platform api) When I try to send a similar structure from bot, I get an error: (#100) Unsupported attachment type Is there a way to send my location from bot? Example of received message to bot: { "object": "page", "entry": [{ "id": "1719442148306048", "time": 1466780344978, "messaging": [{ "sender": {"id": "123456789"}, "recipient": {"id": "987654321"}, "timestamp": 1466780344847, "message": { "mid": "mid.12345698875:c80066d69b6cee1779", "seq": 65,

Facebook Messenger Chatbot how do I collect the users geo location that they send?

て烟熏妆下的殇ゞ 提交于 2019-11-28 18:21:34
In Facebook Messenger there is an icon allowing the user to send their geo coordinates. Is this available on the Facebook Messenger platform yet i.e. if a user sends me their location does my Chatbot have access to it? If so how is it done because i can't see it in the response in my webhook. You get the location as attachment in message. See sample below: { mid: 'mid.1463464074086:96b149e1a047e47842', seq: 2076, attachments: [ { title: 'Anupam\'s Location', url: 'https://www.facebook.com/l.php?u=https%3A%2F%2Fwww.bing.com%2Fmaps%2Fdefault.aspx%3Fv%3D2%26pc%3DFACEBK%26mid%3D8100%26where1%3D19

How to send image from app via messenger?

空扰寡人 提交于 2019-11-28 14:31:25
I want to send image from my app via messenger. I was looking on Stack Overflow and I found answer which works for WhatsApp. When I tried to change "com.whatsapp" to "com.facebook.orca", it stops working. Here is my code: public void shareImageMessenger() { Bitmap adv = BitmapFactory.decodeResource(getResources(), R.drawable.koza); Intent share = new Intent(Intent.ACTION_SEND); share.setType("image/jpeg"); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); adv.compress(Bitmap.CompressFormat.JPEG, 100, bytes); File f = new File(Environment.getExternalStorageDirectory() + File.separator

Share a text with facebook messenger?

橙三吉。 提交于 2019-11-28 00:44:30
Is there a way to share a text in facebook messenger using android and maybe facebook sdk as well? I want to make something like the whatsapp way, choose your text and open an intent to choose the guy you want to send to... Is there a way to do this with facebook messenger? It appears in the intent.choose dialog..but I only want to send to facebook messenger.. use this code onClick,, com.facebook.orca is the package name for fb messenger. Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent .putExtra(Intent.EXTRA_TEXT, "<---YOUR TEXT HERE--->."); sendIntent

Microsoft Bot Framework messages with buttons in Facebook Messenger

主宰稳场 提交于 2019-11-27 15:36:31
问题 I'm working on a bot using the C# Microsoft Bot Framework and I'd like to send messages with action buttons to Facebook Messenger. I've successfully created the bot, deployed it and can communicate with it through Messenger and am now trying to refine the appearance of the bot's responses. I have been able to create single cards and carousels by putting the card info into Message.Attachements but I'd like to also include action buttons. The Messenger Platform docs describe button and "generic

How to send location from Facebook messenger platform?

夙愿已清 提交于 2019-11-27 14:00:00
问题 There is a way to send my location to facebook-messenger from a mobile client, but how can I send some location from a bot? (messenger platform api) When I try to send a similar structure from bot, I get an error: (#100) Unsupported attachment type Is there a way to send my location from bot? Example of received message to bot: { "object": "page", "entry": [{ "id": "1719442148306048", "time": 1466780344978, "messaging": [{ "sender": {"id": "123456789"}, "recipient": {"id": "987654321"},

Facebook Messenger Chatbot how do I collect the users geo location that they send?

谁说胖子不能爱 提交于 2019-11-27 11:15:27
问题 In Facebook Messenger there is an icon allowing the user to send their geo coordinates. Is this available on the Facebook Messenger platform yet i.e. if a user sends me their location does my Chatbot have access to it? If so how is it done because i can't see it in the response in my webhook. 回答1: You get the location as attachment in message. See sample below: { mid: 'mid.1463464074086:96b149e1a047e47842', seq: 2076, attachments: [ { title: 'Anupam\'s Location', url: 'https://www.facebook