I use the following code:
UserTimeline userTimeline = new UserTimeline.Builder().screenName("ZainAlabdin878").build();
final TweetTimelineListAdapter adapter = new TweetTimelineListAdapter(MainActivity.this, userTimeline);
System.out.println(adapter.getCount()+"");
I get the output 0 although I have tweets.
Am I doing something wrong? what I am trying to achieve is to get a list of tweets of a certain user. I'm using android studio and plugin.
*my goal is not to display the list but rather to get a List
many thanks.
more details available here
Here's the code you'll need to actually fetch the
Tweet
objects:You'll need to run this in a new Thread (not the UI Thread)
EDIT
*Technically you don't have to run this in a new thread because it's asynchronous (someone please correct me here if I'm wrong). I know other Twitter API calls are async, so I'm assuming this one is too, although I cannot find where the actual call is happening in the Fabric source..*
Here's the full list of parameters for userTimeline() from the Fabric SDK