tags:

views:

73

answers:

1

How can i get the lists for the authenticated user & the lists that user follows

+1  A: 

This should work:

    var service = new TwitterService();
    service.AuthenticateWith(<your consumerKey>, <your consumerSecret>, <your token>, <your tokensecret>);

    var listsUsersLists = service.ListListsFor(listOwnerScreenName);
    var listsUserIsIn = service.ListListMembershipsFor(listOwnerScreenName);
    var subscribedToLists = service.ListListSubscriptionsFor(subscriberName);

As long as the authenticated username is the same as the name of the lists you are trying to return, private lists will be included too.

starskythehutch
Priyan R
Sorry, I misread. Edited.
starskythehutch
Thanks can i get it using fluenttwitter
Priyan R
I don't know - I've never used fluenttwitter.
starskythehutch
i got it, FluentTwitter.CreateRequest().AuthenticateAs(username, password).Lists().GetListsBy(screenname).AsJson().Request().AsLists().ToList() i didnt notice it before you told using service.. thank you
Priyan R
Watch out, as Twitter are phasing out authentication with a username and password on August 16th and will only be accepting OAuth as their authentication method. Probably best to code that in now, rather than change it very soon.
starskythehutch
yea sure i will go for oauth
Priyan R