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.

有帮助吗?

解决方案

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

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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top