2

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?

c0dehunter
  • 6,412
  • 16
  • 77
  • 139

1 Answers1

0

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
ismail alaoui
  • 5,748
  • 2
  • 21
  • 38
  • Actually as far as I've explored this data is already retrieved, it is just not shown. Is it possible to show it without me forking the whole TwitterKit and editing it? – c0dehunter May 18 '19 at 21:36