Regarding emoji in twitter

restapi
emoji
twitter4j

#1

Hi,
I would like to collect tweets which has emoji symbols. But it simple returns with question marks.
Could you please let me know how to collect tweets with emoji too.

For example : lipton ice tea💛
Result : lipton ice tea?


#2

What library are you using? How are you rendering the output from the library?


#3

Hi Andy,
I am using Twitter4j library (both streaming and REST API’s). The output is in JSON format. Later I will store it in MongoDB for analysis.


#4

Are you using the right unicode settings in your Java app for emoji to be parsed? It sounds like you’re not getting the strings in the correct encoding.


#5

I am using Unicode which is default in Java app. Could you please tell me what Unicode should be used for special characters & emoji’s?


#6

Honestly, I’m not sure. I’d need to do some digging on that since I’ve not tried in Java for a while. When I get some time I might give that a shot. In the meantime, it looks like there are a few libraries around for Java that help with emoji handling.


#7

Thank you, Andy. I will do search on that.


#8

Hi @Dhuberry, the following discussion has solution regarding the same issue.