spring social Twitter update status not giving id_str

122 views Asked by At

I am using spring social twitter for my project. I am trying to make tweet favorite, for that I need id_str = "your tweet id". But the problem is when I do update status using spring social it's return id = "" but not id_str. I seen that it's returning Tweet class. In that class there is no such field like id_str. So my question is how can I get id_str.

NOTE : id and id_str are note same. it's returning different values.

2

There are 2 answers

1
Terence Eden On BEST ANSWER

id and id_str should be the same. id_str is there because some platforms have difficulty handling very large integers.

You should use getId() and then cast the long into a string.

0
Sander Agricola On

The id_str is available in the extraData map:

twitterProfile.getExtraData().get("id_str")