raykichi / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

how login in gtalk #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

JabberClient client = new JabberClient();
JID jid = new JID("PFight@gmail.com");
client.Server = jid.Server;// "gmail.com";
client.User = jid.User; // "PFight";
client.Password = "********";
client.Connect();
client.Login();

//throws "Client must be authenticated before sending messages."
client.Message("nikanakina@gmail.com", "Test"); 

What is the expected output? What do you see instead?

I expect successfull login, but I see IsAuthenticated==false.

What version of the product are you using? On what operating system?
2.1.0.710

Please provide any additional information below.
What I do wrong?

Original issue reported on code.google.com by PFigh...@gmail.com on 25 Mar 2009 at 9:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Problem solved! 

JabberClient client = new JabberClient();
JID jid = new JID("PFight@gmail.com");
client.Server = jid.Server;// "gmail.com";
client.User = jid.User; // "PFight";
client.Password = "********";
client.Connect();
client.Login();
client.OnAuthenticate += new bedrock.ObjectHandler(client_OnAuthenticate);

...
void client_OnAuthenticate(object sender)
{
//Now we Authenticated
    client.Message("nikanakina@gmail.com", "Test"); 
}

Sory, I am really beginner :)))))

Original comment by PFigh...@gmail.com on 27 Mar 2009 at 10:42