Subject: XMPP connection to FaceBook Chat
Hello people!
I wrote my first test application for Windows Phone 7.
Authentication on facebook works, and all works fine except connection to chat.
According to MatriX tutorial I wrote this:
Then I add a breakpoints where I marked.
But my program does not hit breakpoint2 =(
What I've done wrong?
And the next question: how can I determine that a connection was successful?
Client.Open() has no return value =(
I wrote my first test application for Windows Phone 7.
Authentication on facebook works, and all works fine except connection to chat.
According to MatriX tutorial I wrote this:
private void button1_Click(object sender, RoutedEventArgs e)
{
Client.OnBeforeSasl += xmppClient_OnBeforeSasl;
/*breakpoint1 here*/Client.Open();
}
private void xmppClient_OnBeforeSasl(object sender, Matrix.Xmpp.Sasl.SaslEventArgs e)
{
/*breakpoint2 here*/e.Auto = false;
e.SaslMechanism = Matrix.Xmpp.Sasl.SaslMechanism.X_FACEBOOK_PLATFORM;
e.SaslProperties = new Matrix.Xmpp.Sasl.Processor.Facebook.FacebookProperties
{
ApiKey = "xxxxxxxxxxxxx",
ApiSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
SessionKey = AccessToken
};
}
{
Client.OnBeforeSasl += xmppClient_OnBeforeSasl;
/*breakpoint1 here*/Client.Open();
}
private void xmppClient_OnBeforeSasl(object sender, Matrix.Xmpp.Sasl.SaslEventArgs e)
{
/*breakpoint2 here*/e.Auto = false;
e.SaslMechanism = Matrix.Xmpp.Sasl.SaslMechanism.X_FACEBOOK_PLATFORM;
e.SaslProperties = new Matrix.Xmpp.Sasl.Processor.Facebook.FacebookProperties
{
ApiKey = "xxxxxxxxxxxxx",
ApiSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
SessionKey = AccessToken
};
}
Then I add a breakpoints where I marked.
But my program does not hit breakpoint2 =(
What I've done wrong?
And the next question: how can I determine that a connection was successful?
Client.Open() has no return value =(