redouane59 / twittered

Twitter API client for Java developers
Apache License 2.0
235 stars 64 forks source link

getUserTimeline method issue #350

Closed jobchumo closed 2 years ago

jobchumo commented 2 years ago

image

Getting the output above when invoking the getUserTimeline method instead of the tweet id and text

jobchumo commented 2 years ago

This is the code used when using the method

`` TweetList userTimeline = twitterClient.getUserTimeline(id);

List tweetList = userTimeline.getData();

         for (int i = 0; i<tweetList.size(); i++) {

                String nu = tweetList.get(i).toString();

                Log.d("tweet Content", nu);
            }``
redouane59 commented 2 years ago

tweetList.get(i) gives you a Tweet not a String. You should try tweetList.get(i).getText() instead.

jobchumo commented 2 years ago

tweetList.get(i).getText() worked. Thanks for your help