2011-01-24 23 views
0

嗨 我想在我的mvc.net應用程序中使用Tweetsharp來獲取列表偏好並與他們共享圖像。 但我沒有得到適當的文件和相同的樣本。什麼是需要添加控制器的行動和在視圖頁面。tweetsharp在mvc.net中的實現

請給出一些相同的鏈接。

感謝

munish

回答

-1

我不知道Tweetsharp但看看linq2twitter。它可以通過使用LINQ輕鬆訪問Twitter API。

0
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); 
} 

還要注意上面的代碼中使用名爲TweetSharp第三方庫。

至於圖像林不知道,什麼可以做,但你可以看看Twitter的REST API v1.1的信息

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