Hello I am integrating the Messenger into my site. I am using VB.
I have read the documentation however unsure where I need to put the following code:
a. Create a class that inherits CuteChat.ChatProvider and implement these methods:
public override string GetConnectionString()
{
return the connection string , for the CuteChat
}
public override string FindUserLoginName(string nickName)
{
find the login username from the display name or null if the user is not found.
}
public override AppChatIdentity GetLogonIdentity()
{
need to find the information of current user. Return null if user is anonymous.
string loginname=...
string nickname=...
return new AppChatIdentity(nickname, false, ToUserId(loginname), HttpContext.Current.Request.UserHostAddress);
}
public override bool GetUserInfo(string loginName, ref string nickName, ref bool isAdmin)
{
return false , if the loginName is invalid.
otherwise set the nickName and isAdmin , and return ture
}
public override bool ValidateUser(string loginName, string password)
{
check the username/password .
if valid , set the cookie.
}
b. Initialize an instance of provider when the application starts: CuteChat.ChatProvider.Instance = new MyChatProvider();
CuteChat.ChatSystem.Start(new CuteChat.AppSystem());