Twitter4j favourite count

Hello,

I am trying to figure out how to solve the following:

I am using the following code to display the favourite count of a tweet:

public void onStatus(Status status) {
int favCount = status.getFavoriteCount();
...

The problem I am having is that I can only get this to give the favCount when the tweet is created and thus the favCount is always 0. I am saving the tweet to an arraylist like this:

tweet = status.getText();
allTweets.append(tweet);
...

Is there a way I can keep updating the favCount of each saved tweet?

I hope this makes sense!

Thanks!

Tagged:

Answers

  • _vk_vk
    edited February 2016

    Grab Status's ID from the Status in your ArrayList, check with the API the updated fav count, and modify the Status in the ArrayList if needed.

    That's probably a stupid answer :-@ :D

    no code here, but I guessed your question was not about which code to write...

Sign In or Register to comment.