2

I've been trying to get X-FACEBOOK-PLATFORM to work for a while.

I keep getting an Unauthorized error every time I try anything.

One of the devs working with me wrote a blog post about it here: http://www.ianquigley.com/A91_Facebook_Chat_Authentication_in_C.html

That is the basic process that we are using.

The code that we are using is here:

http://code.google.com/p/xda-winmo-facebook/source/browse/#svn%2Ftrunk%2FXDAFacebook%2FFbChat

Basically, I would like some further clarification about the authentication processes and maybe some reasons why I would be getting an unauthenticated message even though I follow the steps on the facebook dev site to a T (at least that is the assumption)

Any help would be great!

Here is the send/receive pattern: (The keys have all been changed FYI)

Key: 123567890560796 Secret: 8f1234abcde123a4567bcd1234beb5e Session: a0b12fb345c67890d98e7ea8.3-12345678

Out: <?xml version='1.0'?>
Out: <stream:stream id='1' to='chat.facebook.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' >
In: <?xml version="1.0"?><stream:stream id="1C70507D" from="chat.facebook.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-FACEBOOK-PLATFORM</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms></stream:features>
Out: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='X-FACEBOOK-PLATFORM'/>
In: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dmVyc2lvbj0xJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9QjBEMDIyREVBNkRERjdBRkVCNzgxQUY1QUM0NDNCQTY=</challenge>
Out: <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>YXBpX2tleT0xMjM1Njc4OTA1NjA3OTYmY2FsbF9pZD0xMzE0OTkwNjcwJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9QjBEMDIyREVBNkRERjdBRkVCNzgxQUY1QUM0NDNCQTYmc2Vzc2lvbl9rZXk9YTBiMTJmYjM0NWM2Nzg5MGQ5OGU3ZWE4LjMtMTIzNDU2Nzgmdj0xJnNpZz1lMTM2YTRjNmEzMDEwN2Y3MzhjZjA2NzMwYzhhZjZiOA==</response>
In: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>





The facebook challenge text
version=1&method=auth.xmpp_login&nonce=B0D022DEA6DDF7AFEB781AF5AC443BA6

and my return challenge text
api_key=123567890560796&call_id=1314990670&method=auth.xmpp_login&nonce=B0D022DEA6DDF7AFEB781AF5AC443BA6&session_key=a0b12fb345c67890d98e7ea8.3-12345678&v=1&sig=e136a4c6a30107f738cf06730c8af6b8

The sig looks like this
api_key=123567890560796call_id=1314990670method=auth.xmpp_loginnonce=B0D022DEA6DDF7AFEB781AF5AC443BA6session_key=a0b12fb345c67890d98e7ea8.3-12345678v=18f1234abcde123a4567bcd1234beb5e

If there are any facebook people that want the real streams with the correct keys, give me a contact address and I'll send it to you.

joe_coolish
  • 7,201
  • 13
  • 64
  • 111

1 Answers1

0

I've just answered the same question and I gave this solution:

Integrating Facebook chat

I think it can helps you.

Adrian
  • 721
  • 2
  • 11
  • 34