c++ - xmpp authenticate to face book chat api and always receive a failure -


i use gloox open source api works again several other xmpp servers. use following code

 jid jid( "userid@chat.facebook.com" );   j = new client( jid, "password" );   j->setserver("chat.facebook.com");   j->setport(5222);   j->setsaslmechanisms(gloox::saslmechplain);   j->settls(gloox::tlspolicy::tlsrequired);    j->registerconnectionlistener( );   j->registermessagesessionhandler( this, 0 );   j->disco()->setversion( "messagetest", gloox_version, "windows" );   j->disco()->setidentity( "client", "bot" );   j->disco()->addfeature( xmlns_chat_states );   stringlist ca; 

it connects , opens tls socket receives saslnotauthorized facebook.

is userid correct? missing facebook?

any appreciated.

  • check facebook chat jid here, under "other" link.
  • you no need change server, port, sasl or tls parameters, set jid , password, xmpp library should find other parameters automatically. tested gloox , works fine.

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -