0

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 Answers2

0

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.

Terence Eden
  • 14,034
  • 3
  • 48
  • 89
  • Thanks Terence. I already check that before. Even if you look at twitter console https://dev.twitter.com/rest/tools/console . In this try to update status it's will give both id and id_str both which are different. – Naitik Dabhi Nov 21 '14 at 10:41
0

The id_str is available in the extraData map:

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

Sander Agricola
  • 388
  • 1
  • 10