javaspringtwitterspring-social-twitter

spring social Twitter update status not giving id_str


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.


Solution

  • 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.