Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Messenger API:how to break line in a message

Tags:

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?

like image 267
voxter Avatar asked Jun 29 '16 13:06

voxter


People also ask

How do you start a new line without sending a message?

For most writing, this is not a problem until you want Word to not create a new paragraph. Thankfully, there is a keyboard shortcut that moves to the next line. Move the text cursor to where you want the new line to begin, press the Enter key, hold down the Shift key, and then press Enter again.

How do you do a paragraph break on Facebook Messages?

When you're ready to format the line break, hold down the "Shift" button on your keyboard and press "Enter." Let go of the "Shift" button when you're finished. The line break is created and you can continue typing out the next line of your comment or status update.


2 Answers

Turns out Line break in Facebook status update via Graph API might give you what you are looking for:

Use \u000A

For me it solved my similar issue I had with Facebook SendApi for a Facebook Messenger Bot.

like image 77
tyrex Avatar answered Sep 26 '22 02:09

tyrex


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.

like image 45
Kumar Rakesh Avatar answered Sep 25 '22 02:09

Kumar Rakesh