Question

In twitter4j library there is one function which takes the statusId (i.e. the id of a particular tweet) as parameter whose type is long. But I need to pass the id of a tweet whose value exceeds the range of long.

IDs ids=twitter.getRetweeterIds(441620973931200512, 100);

Here the first parameter is statusId of type long. But my value clearly exceeds the long range which causes error.

Is there any other method which I can use or maybe the method but some other way?

P.S: Please feel free to ask if any other information required.

Was it helpful?

Solution

All I had to do was put L after the id.

IDs ids=twitter.getRetweeterIds(441620973931200512L, 100);

OTHER TIPS

Well, the range of long is -9223372036854775808 ~ 9223372036854775807, and the statusid doesn't exceed the range. Compare them. I guess the error is caused by other problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top