本文整理汇总了C#中TweetSharp.TwitterService.EndListTweetsOnHomeTimeline方法的典型用法代码示例。如果您正苦于以下问题:C# TwitterService.EndListTweetsOnHomeTimeline方法的具体用法?C# TwitterService.EndListTweetsOnHomeTimeline怎么用?C# TwitterService.EndListTweetsOnHomeTimeline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TweetSharp.TwitterService
的用法示例。
在下文中一共展示了TwitterService.EndListTweetsOnHomeTimeline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTwitterTweets
public static List<ModelTwitterFeedsDetails> GetTwitterTweets(string ScreenName)
{
ModelTwitterFeeds modelTwitterFeeds = new ModelTwitterFeeds();
List<ModelTwitterFeedsDetails> lstModelTwitterFeedsDetail = new List<ModelTwitterFeedsDetails>();
try
{
/*>>> API Creadentials <<<<////
>> Under Informnation is creating from Personal Account Information API
>> For any change in this credentials Login Account : [email protected]
>> API Name : News Get Application
>> Please don't change any word without permission from following API Admin*/
string _consumerKey = "cvRCCaqLUlM9SyolFwYEQQ2uZ";
string _consumerSecret = "sVvOgCPwuzXo37v4qjAriGbftwEefMC9xNadPQLTsoOkeqiJ8C";
string _accessToken = "65042389-YQ3jLfP1RWu9Q7So9VAj3Rc3J9oMB0Suuv0jlioAN";
string _accessTokenSecret = "yHMVHihkHAaCIOJi2M9WEOq4fpODY1a0hdS92J9OZEJEL";
// API access Data End
var service = new TwitterService(_consumerKey, _consumerSecret);
//var tweets = new ListTweetsOnHomeTimelineOptions();
service.AuthenticateWith(_accessToken, _accessTokenSecret);
IAsyncResult result = service.BeginListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
IEnumerable<TwitterStatus> tweets = service.EndListTweetsOnHomeTimeline(result);
foreach (var tweet in tweets)
{
if (tweets != null)
{
modelTwitterFeeds.FeedId = 0;
modelTwitterFeeds.UserPageId = 0;
modelTwitterFeeds.UserPageTitle = String.Empty;
modelTwitterFeeds.UserScreenName = String.Empty;
modelTwitterFeeds.UserPageLanguage = String.Empty;
modelTwitterFeeds.UserPageFollowers = 0;
modelTwitterFeeds.UserPageCoverImageURL = String.Empty;
modelTwitterFeeds.UserPageLogoImage = String.Empty;
}
var st1 = tweet.Text; //string
var st2 = tweet.Source; //string
var st3 = tweet.TextAsHtml; //string
var st4 = tweet.TextDecoded; //string
var st5 = tweet.RetweetedStatus; //TwitterStatus
var st6 = tweet.RetweetCount; //int
var st7 = tweet.RawSource; //string
var st8 = tweet.Place; //TwitterPlace
var st9 = tweet.Location; //TwitterGeoLocation
var st10 = tweet.Language; //string
var st11 = tweet.IsTruncated; //bool
var st12 = tweet.IsRetweeted; //bool
var st13 = tweet.IsPossiblySensitive; //bool is nullable
var st14 = tweet.IsFavorited; //bool
var st15 = tweet.InReplyToUserId; //long is nullable
var st16 = tweet.InReplyToStatusId; //long is nullable
var st17 = tweet.InReplyToScreenName; //string
var st18 = tweet.IdStr; //string
var st19 = tweet.Id; //long
var st20 = tweet.FavoriteCount; //int
var st21 = tweet.ExtendedEntities; //TwitterExtendedEntities
var st22 = tweet.Entities; //TwitterEntities
var st23 = tweet.CreatedDate; //DateTime
var st24 = tweet.Author; //ITweeter
}
//TwitterAccount user = new TwitterAccount.
//TwitterUser twitterUser =
//>>GET OTHER USER TIMELINE//BeginListTweetsOnHomeTimeline
TwitterService t_service = new TwitterService(_consumerKey, _consumerSecret);
t_service.AuthenticateWith(_accessToken, _accessTokenSecret);
var t_options = new ListTweetsOnHomeTimelineOptions();
t_options.ExcludeReplies = true;
var t_tweets = t_service.ListTweetsOnHomeTimeline(t_options);
//ListTweetsOnSpecifiedUserTimeline
string ScreenNameBBCArabic = "BBCArabic";
string ScreenNameCNNArabic = "cnnarabic";
string ScreenName1 = "garbo_speaks";
var User_OptionInit = new ListTweetsOnUserTimelineOptions { ScreenName = ScreenNameCNNArabic, Count = 200, ExcludeReplies = true };
var User_Tweets = service.ListTweetsOnUserTimeline(User_OptionInit);
string TweetText = String.Empty;
foreach (var tweet in User_Tweets)
{
var userDetail = tweet.User;
if (false)
{
var us1 = tweet.User.ContributorsEnabled; //bool?
var us2 = tweet.User.CreatedDate;
var us3 = tweet.User.Description;
var us4 = tweet.User.FavouritesCount;
var us5 = tweet.User.FollowersCount;
var us6 = tweet.User.FollowRequestSent;
var us7 = tweet.User.FriendsCount;
var us8 = tweet.User.Id;
var us9 = tweet.User.IsDefaultProfile;
var us10 = tweet.User.IsGeoEnabled;
var us11 = tweet.User.IsProfileBackgroundTiled;
var us12 = tweet.User.IsProtected;
var us13 = tweet.User.IsTranslator;
//.........这里部分代码省略.........