Send emoji through yowsup-cli
How am I supposed to use the Emotions unicode when sending a message
I took the unicode from http://apps.timwhitlock.info/emoji/tables/unicode
And tried yowsup-cli demos -l phobe:b64pass -s phone UNICODE
But I receive it in plain text.
Thanks in advance.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Please use SoftBank codes from this page : code.iamcal.com/php/emoji/
@kuldippatel Did you try out what you just suggested? It doesnt work
At the moment yowsup-cli is not meant to be used for sending emoji. But I'll leave this issue open as a reference in case it gets implemented, I've updated the issue title as well
I had used it in legacy code.
Sample code.
finalMsg= msg+ u'\ue058'
@kuldippatel yes it should work fine from code, sending from command line using yowsup-cli is a diff thing in this scenario
just add two commands in cli: "/:)" - semd smile emoji "/:(" - send sad emoji or so :D
You could replace some stuff code side but that wont be a general solution to the Problem. You can add some Emojis but not every single one... Well you could but you get the point. I did something like that to be able to send NewLine by replacing all "###" with "\n"
Hey, it is not working from the code. Can somebody share a sample snippet? I am getting an exception.
@tgalal Sorry Tarek for duplication. Thanks for closing it.
~~I am unable to send smileys, I get the error;~~
File "/Users/sbot/Documents/projects/Sbot/yowsup/structs/protocoltreenode.py", line 69, in toString
out += "\nHEX:%s\n" % binascii.hexlify(self.data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\ue058' in position 16: ordinal not in range(128)
while trying to send text_msg = u"*slow clap* ... \ue058" I tried to use
text_msg = "*slow clap* ... \ue058" but it sends the literal text not the emoticon. ~~Anyone know how?~~
Edit: I forgot to encode the message to text_msg = u"*slow clap* ... \ue058".encode('utf-8') This sends the message however text_msg = u"*slow clap* ... \ue058" doesnt so beware.
tested under python 2.7.6 and 2.7.9
you have to encode it, like so:
text_msg = "slow clap ... \ue058".encode("utf-8")
-------- Original Message -------- From:Sinan Midillili [email protected] Sent:Tue, 01 Sep 2015 13:38:50 -0300 To:tgalal/yowsup [email protected] Subject:Re: [yowsup] Send emoji through yowsup-cli (#529)
I am unable to send smileys, I get the error;
File "/Users/sbot/Documents/projects/Sbot/yowsup/structs/protocoltreenode.py", line 69, in toString out += "\nHEX:%s\n" % binascii.hexlify(self.data) UnicodeEncodeError: 'ascii' codec can't encode character u'\ue058' in position 16: ordinal not in range(128)
while trying to send text_msg = u"slow clap ... \ue058" I tried to use text_msg = "slow clap ... \ue058" but it sends the literal text not the emoticon. Anyone know how?
— Reply to this email directly or view it on GitHub.