/// <summary> /// Allows the authenticating users to follow the user specified in the ID parameter. /// </summary> /// <param name="oAuth"></param> /// <param name="UserId"></param> /// <returns></returns> public JArray PostFriendships_Create(oAuthTwitter oAuth,string UserId) { Friendship objFriend = new Friendship(); JArray jobj = new JArray(); jobj = objFriend.Post_Friendships_Create(oAuth, UserId); return jobj; }
public string PostFollow(string _OAuthToken, string OAuthSecret, string TwitterScreenName, string TwitterUserId, string toId, string toName) { JArray ret = new JArray(); try { oAuthTwitter OAuthTwt = new oAuthTwitter(ConfigurationManager.AppSettings["consumerKey"], ConfigurationManager.AppSettings["consumerSecret"], ConfigurationManager.AppSettings["callbackurl"]); OAuthTwt.AccessToken = _OAuthToken; OAuthTwt.AccessTokenSecret = OAuthSecret; OAuthTwt.TwitterScreenName = TwitterScreenName; OAuthTwt.TwitterUserId = TwitterUserId; Friendship _TwitterFriends = new Friendship(); ret = _TwitterFriends.Post_Friendships_Create(OAuthTwt, toId); } catch (Exception ex) { } return ret.ToString(); }