How to check and encode input emojis from Facebook messenger?
<p>I'm building a Facebook messenger bot in Python. And everything works fine. But if I send <code>emojis</code> as text from Facebook chat to API, then it goes wrong. 
This is an example when I send <code>emojis</code> from Facebook.</p>

<pre><code>{'message': {'mid': 'mid.1475846223244:e7eea53884', 'seq': 10863, 'text': 'í ½í±í ¼í¿½'},
</code></pre>

<p>So the <code>received_message = message['message']['text']</code>. 
What I want is whenever I send a (emoji) <code>non text message</code> from Facebook, I can scan and encode it before I send it to my API. I have read documents before asking this question but most of them are given <code>emojis</code> from user and not all a scanner and encode any <code>emojis</code> (if I miss something, please correct me because i'm a newbie). Tell me if I need to update my question.</p>

<p>You should use the escaped version of the corresponding code point. This is a technique that allow you to express the whole Unicode range using only ASCII characters.</p>

<p>EG. The Emoji í ½í²© can be represented in Java as <code>"\uD83D\uDCA9"</code> or in Python as <code>u"\U0001F4A9"</code>. <a href="http://www.fileformat.info/info/unicode/char/1f4a9/index.htm" rel="nofollow">http://www.fileformat.info/info/unicode/char/1f4a9/index.htm</a></p>

<p>NB: some emojis are composed by multiple code points such as flags or families. Please find here the complete list of Unicode Emojis <a href="http://unicode.org/emoji/charts/full-emoji-list.html" rel="nofollow">http://unicode.org/emoji/charts/full-emoji-list.html</a></p>

python facebook encoding emoji