Hi I want to use Tweetsharp in my mvc.net application to get the list offriends and to share image with them. But i haven't got the proper documentation and sample for the same. What is need to add in controller action and what in view page.
Please give some links for th开发者_C百科e same.
Thanks
munish
public void MyMethod() {
TwitterService service = new TwitterService(key, secret, "Token", "Secret");
ListFriendsOptions options = new ListFriendsOptions();
options.Cursor = 12345;
// should the response have user entities
options.IncludeUserEntities = false;
// The screen name of the user for whom to return results for.
options.ScreenName = "";
options.SkipStatus = false;
// The ID of the user for whom to return results for.
options.UserId = 12345;
// this will return a list of friends for the specified user.
TwitterCursorList<TwitterUser> listOfFriends = service.ListFriends(options);
}
Also note the code above uses a third party library called TweetSharp.
As for the images im not sure as to what to do but you can look at the twitter REST API v1.1 for information
https://dev.twitter.com/docs/api/1.1/get/friends/list
https://dev.twitter.com/docs/api/1.1
TweetSharp https://github.com/danielcrenna/tweetsharp
I don't know about Tweetsharp but take a look at linq2twitter. It provides easy access to the Twitter API through the use of LINQ.
精彩评论