c0dehunter
c0dehunter

Reputation: 6140

Android TwitterKit not showing retweets and likes

I am using TwitterKit for Android to show tweets inside my app. Works well, but for some reason it is not showing number of retweets and likes below each tweet.

enter image description here

Here is my code:

SearchTimeline searchTimeline = getTimeline("#somehashtag", "en");

tweetAdapter = new TweetTimelineRecyclerViewAdapter.Builder(getActivity())
        .setTimeline(searchTimeline)
        .setViewStyle(R.style.tw__TweetDarkStyleNonTransparent)
        .build();

mTweetsRecycler.setAdapter(tweetAdapter);

And here is the style:

<style name="tw__TweetDarkStyleNonTransparent">
    <item name="tw__container_bg_color">#303030</item>
    <item name="tw__primary_text_color">#e1ffffff</item>
    <item name="tw__action_color">#55acee</item>
    <item name="tw__action_highlight_color">#667580</item>
    <item name="tw__tweet_actions_enabled">true</item>
</style>

The above style is my custom style, based on official style. Style is working but retweet count and likes are still not showing.

What am I missing?

Upvotes: 2

Views: 127

Answers (1)

ismail alaoui
ismail alaoui

Reputation: 6073

based on the Tweet Data Dictionary from the official documentation i think you have to fetch the json by your self and get the element you want to show :

Number of times this Tweet has been retweeted. Example:

"retweet_count":160

Nullable. Indicates approximately how many times this Tweet has been liked by Twitter users. Example:

"favorite_count":295

Upvotes: 0

Related Questions