views:

110

answers:

3

Hi guys,

I want to build an XMPP client on android, I've got it running perfect with authentication using Digest-MD-5, however when I try to convert it to X-FACEBOOK-PLATFORM it keeps failing. Could someone tell me why? I've attached the source code. I know it's something really small but I can't seem to figure it out.

The source can be downloaded from. Any help would be much appreciated.

link text

A: 
<auth mechanism="X-FACEBOOK-PLATFORM" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"></auth>

    <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dmVyc2lvbj0xJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9RDlBMTExNUIyQjVEMUQ2MTYyREQ3RDI4QUQ1QTQzN0U=</challenge>

    <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">YXBpX2tleT1kYjJlYTljYzQ4YWI3OGQ5YTRhMmM5ODZiMjZiMGU4MSZjYWxsX2lkPTEyODQ2MTcxMTEmbWV0aG9kPWF1dGgueG1wcF9sb2dpbiZub25jZT1EOUExMTE1QjJCNUQxRDYxNjJERDdEMjhBRDVBNDM3RSZzZXNzaW9uX2tleT0xNjIxNzE0NjA0NTk5ODUlMjU3Y2IzNGNhMjk3MmEzYmY4YTNhYWM3OGQ3MS01MDMxNTk3MzIlMjU3Y3V4Ym1fenNraXN0Y2p3ZXdndHZmejZsdGw0OCZ2PTEuMCZzaWc9ZjA0YTFmODk1YzA0ZWE5NDIzODhjNDU4YjQzMzkzMDQ=</response>

    <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>

That's the response I get :(

I use the API_KEY, Application Secret, and the session key..to generate the response...

It's all in the code. I can tell you what classes are important.

Hades
A: 

What I didn't know was that X-FACEBOOK-PLATFORM doesn't support the authentication and it requires the session key from the old rest API. Once I used the session key it worked perfectly.

Hades
A: 

The answer to this is that it uses the session_key and not the authentication token. That's why it kept failing.

Hades