简体   繁体   中英

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.

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.

在此处输入图片说明

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

actually, a much simple thing is to just add the emoji to the text like this:

tweet_test = 'this is emoji 😁'
api.update_status(status=tweet)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM