c# - Using Twitterizer to display the outbound tweets, not replies -



c# - Using Twitterizer to display the outbound tweets, not replies -

ia m using twitterizer diplay tweets on website , issue showing tweets ,i want show tweets user not replies, code using is:

if (!page.ispostback) { seek { usertimelineoptions options = new usertimelineoptions(); options.screenname = "xxxxx"; twitterstatuscollection tweets = twittertimeline.usertimeline(options).responseobject; int counter = 0; string twittercode = ""; foreach (twitterstatus thisstatus in tweets) { if (counter < 7) { datetime completedate = thisstatus.createddate; string finish = completedate.tolongdatestring(); twittercode += "<li><p ><a href=\"http://twitter.com/" + thisstatus.user.screenname + "\" target=\"_blank\" >" + server.htmlencode(thisstatus.text) + "<br/><span style=\"color:#e87d05;\">" + finish + "</a></p></li>"; counter += 1; } else { break; } } ltltweets.text = twittercode; } grab (exception ex) { } }

the above code works fine want avoid replies , how can have gone through documentation of twitteriser couldnt find solution , anysuggestions or help appreciated thanks

the usertimelineoptions object allows exclude retweets vie includeretweets property. so:

usertimelineoptions options = new usertimelineoptions() { screenname = "myname", userid = 123456789, includeretweets = false, count = 10, };

the userid helps twitterapi figure out requesting tweets made specific combination of userid , screenname (i.e account).

i'm not sure if necessary, send oauthtokens object in request.

oauthtokens token = new oauthtokens() { accesstoken = "xx", accesstokensecret = "xx", consumerkey = "xx", consumersecret = "xx" };

you hold of info creating app under twitter business relationship @ http://dev.twitter.com.

then include token in call:

twittertimeline.usertimeline(token, options);

hope helps =)

c# twitter twitterizer

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -