-
-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Sending emojis #48
Comments
Hello! $emoticons = "\ud83d\udc4e";
$data['text'] = "your text ".json_decode('"'.$emoticons.'"').' bla bla'; |
It works! Thanks one more time 👍 I've done a IRC Trivial like bot and with emojis will look better!!! :) |
And so can use here: $data['text'] = "\xF0\x9F\x91\x8D"; // :thumbsup: important: must use into double quotation. |
Or better yet, just use a proper dedicated library: |
@noplanman Requires php: ^7.0 is stringent. |
True, as should any serious project nowadays. |
Double quote was my solution |
Hi,
First of all thanks for your code and work, it makes very easy to make a bot.
I want to send emojis and I can't see how to do it.
I've sent to a log file all messages I recive and I sent in the conversation with the bot. Then I sent to the bot all the emojis I want. Then I tried to resent the message I recived and the emoji was shown.
But, when I try to send the text I have in my log file, it doesn't work at all...
My log:
2015-10-29 8:48:31 Jontxu ha puesto lo siguiente : \ud83d\udc4e\n\n"
In my code I tried all I find:
$data['text'] .= "\n" . '\ud83d\udc4e\n\n'
OR
$data['text'] .= "\n" . utf8_encode('\ud83d\udc4e\n\n')
OR
$data['text'] .= "\n" . utf8_decode('\ud83d\udc4e\n\n')
OR as I have read here: http://stackoverflow.com/questions/31279158/unicode-characters-like-emoticons-in-telegram-bot-message-or-keyboard
$data['text'] .= "\n" . '\xF0\x9F\x91\x8E'
Can you please give me a clue?
Thanks!
The text was updated successfully, but these errors were encountered: