Atula Atula - 1 year ago 111
Java Question

Get Tweets with Fabric

Can Anybody tell me how to get Tweets by using

fabric sdk

I have tried the official link, but getting errors.

So I need a way to use the code for Showing Tweets in different activity as I am already doing a lot in my MainActivity.

errors are random like

"import;" is depreciated.

no loop using import;

Actually I have tried a lot of things so getting different errors


Answer Source

ok I have found out the way out.
We can do it in two ways either use Default fabric twitter adapter for timeline or make a custom adapter.
Here, I am using the default way

final UserTimeline userTimeline = new UserTimeline.Builder()
                    .screenName(userScreenName).build(); //creating user timeline

final TweetTimelineListAdapter adapter = new TweetTimelineListAdapter.Builder(this)

setListAdapter(adapter); //adapter for fetching tweets

NOTE: userScreenName can be fetched on successfull login.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download