This project is read-only.
Manyou API .NET client

v0.1

调用示例


ManyouSession session = new ManyouSession(apikey, apisecret);

//应用需要安装
session.RequireAdd();

//user.getLoggedInUser
Me me = session.GetLoggedInUser();

//user.getInfo
User user = session.GetUserInfo(session.GetLoggedInUser().UId);

//friend.get
Friend[] f = session.GetFriends();

//friend.areFriends
bool arefriends = session.AreFriends( session.GetLoggedInUser().UId, 1592626)

//feed.publishTemplatizedAction
session.PublishTemplatizedAction("{actor} 阅读了 {book}", "{\"book\":\"男人的魅力\"}", "来自 读书吧 的用户为 {book} 打了 {num_stars} 分", "{\"book\":\"<a href=\\\"http:\\/\\/www.someurl.com\\/men\\\">男人的魅力<\\/a>\",\"num_stars\":5}", "<my:name uid=\"1000439\" /> Ta 说 \"本书改变了我的人生\"", "http://www.discuz.net/ucserver/avatar.php?uid=881035", "http://www.discuz.net/ucserver/avatar.php?uid=881035", "", "", "", "", "", "");

//profile.getMYML
string myml = session.GetMYML();

//profile.setMYML
session.SetMYML("asdfasdfasdf");

//notification.get
Notification n = session.GetNotification();

//notification.send
session.SendNotification(session.GetLoggedInUser().UId.ToString(), "hello world");

This is a opensource c-sharp client project for the manyou REST-like web service.you can use it develop apps for Manyou Open Platform by csharp or other .NET languages.

NOTICE: for the iframe mode,it doesn't work on safari when redirect to another page from the callback page,because of the safari iframe cookie writing issue.

Last edited Sep 23, 2008 at 8:01 AM by bryanchow, version 5