/// <summary> /// FollowersStatusOfUser /// </summary> /// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param> /// <param name="ScreenName">User Screen Name</param> /// <returns></returns> public List <userstatus> GetFollowersStatusOfUser(oAuthTwitter OAuth, string ScreenName, string cursor) { userstatus objUserStatus = new userstatus(); Twitter.Core.UserMethods.Users Users = new Twitter.Core.UserMethods.Users(); xmlResult = Users.FollowersStatus(OAuth, ScreenName, cursor); XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("user"); foreach (XmlNode xn in xmlNodeList) { XmlElement imageUrlElement = (XmlElement)xn; objUserStatus.Id = imageUrlElement.GetElementsByTagName("id")[0].InnerText; XmlElement followersCountElement = (XmlElement)xn; objUserStatus.ScreenName = followersCountElement.GetElementsByTagName("screen_name")[0].InnerText; XmlElement friendCountElement = (XmlElement)xn; objUserStatus.ProfileImageUrl = new Uri(friendCountElement.GetElementsByTagName("profile_image_url")[0].InnerText); UserMethod.Add(objUserStatus); } return(UserMethod); }
/// <summary> /// FollowersStatusOfUser /// </summary> /// <param name="OAuth">OAuth Keys Token, TokenSecret, ConsumerKey, ConsumerSecret</param> /// <param name="ScreenName">User Screen Name</param> /// <returns></returns> public List<userstatus> GetFollowersStatusOfUser(oAuthTwitter OAuth, string ScreenName, string cursor) { userstatus objUserStatus = new userstatus(); Twitter.Core.UserMethods.Users Users = new Twitter.Core.UserMethods.Users(); xmlResult = Users.FollowersStatus(OAuth, ScreenName, cursor); XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("user"); foreach (XmlNode xn in xmlNodeList) { XmlElement imageUrlElement = (XmlElement)xn; objUserStatus.Id = imageUrlElement.GetElementsByTagName("id")[0].InnerText; XmlElement followersCountElement = (XmlElement)xn; objUserStatus.ScreenName = followersCountElement.GetElementsByTagName("screen_name")[0].InnerText; XmlElement friendCountElement = (XmlElement)xn; objUserStatus.ProfileImageUrl = new Uri(friendCountElement.GetElementsByTagName("profile_image_url")[0].InnerText); UserMethod.Add(objUserStatus); } return UserMethod; }