Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hiii, Raju Hear .

How to integrate google talk in web base application(asp.net).

only just send msg to another user use a google talk account.

and nothing .

thanks .
Posted
Updated 17-Jan-14 2:14am
v3

1 solution

HIii.

i use this code but this is not working any idea or suggestion for this ??
pls .

private void btnSend_Click(object sender, EventArgs e)
{
XmppClientConnection xmpp = new XmppClientConnection();
xmpp.Server = "gmail.com";
xmpp.ConnectServer = "talk.google.com";
xmpp.Port = 5222;
xmpp.Username = "Sender@gmail.com";
xmpp.Password = "*******";
xmpp.Open();

agsXMPP.Jid JID = new Jid("Receiver@gmail.com");

xmpp.MesagageGrabber.Add(JID, new agsXMPP.Collections.BareJidComparer(), new MessageCB(MessageCallBack), null);

agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
msg.Type = agsXMPP.protocol.client.MessageType.chat;
msg.To = JID;
msg.Body = "vd9a98asd55f5asdfa50 ";// This small msg to send .
xmpp.OnLogin += delegate(object o) { xmpp.Send(msg); };

xmpp.Close();

}
static void MessageCallBack(object sender,agsXMPP.protocol.client.Message msg,object data)
{
if (msg.Body != null)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("{0}>> {1}", msg.From.User, msg.Body);
Console.ForegroundColor = ConsoleColor.Green;
}
}
 
Share this answer
 
Comments
Seemant Pareek 17-Apr-15 4:27am    
error show...........


CS1061: 'agsXMPP.XmppClientConnection' does not contain a definition for 'MesagageGrabber' and no extension method 'MesagageGrabber' accepting a first argument of type 'agsXMPP.XmppClientConnection' could be found (are you missing a using directive or an assembly reference?)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900