I see there is a API call for Frienships/Show, but I am not sure how to parse the开发者_C百科 response to get the true/false.
Here is my code so far:
var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs(_userName, _password)
.Friendships().Verify(_userNameToCheck)
.AsJson();
var response = twitter.Request();
Also, once authenticated, how to do set a user to follow you?
With TweetSharp you can access the friendships/exists API this way:
var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs(_username, _password)
.Friendships()
.Verify(_username).IsFriendsWith(_userNameToCheck)
.AsJson();
There is no way to "set a user to follow you", they have to choose to follow you on their own.
There is an API for that listed in the API Wiki. The document can be found here. This will simply return true if it user A is following user B. Here is a list of Libraries that probably support what your after.
精彩评论