Search code examples
pythontweepy

Add emoticons in tweet text updated using tweepy


I am creating an auto-DM bot using tweepy. I want to add emojis to the text. Is it possible? I have tried adding '😻💗' and :heartpulse::heart_eyes_cat: without luck.


Solution

  • Adding :heartpulse::heart_eyes_cat: like this doesn't help.

    Since emoticons are just special characters, all you have to do is use the right encoding to add them in the text. All you need to display is the font that support them.

    U+1F601 is 16 bit unicode. In this U+1F601 is unicode representation of emoticon character.

    enter image description here

    For more info on the unicode and utf representation of emoticons refer to the following link. https://apps.timwhitlock.info/emoji/tables/unicode