2011-09-01 67 views
2

我一直試圖讓X-FACEBOOK-PLATFORM工作一段時間。X-FACEBOOK-PLATFORM未授權

我每次嘗試任何時候都會收到未經授權的錯誤。

一個和我一起工作的開發者寫了一博客文章在這裏: http://www.ianquigley.com/A91_Facebook_Chat_Authentication_in_C.html

這就是我們所使用的基本過程。

,我們正在使用的代碼是在這裏:

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

基本上,我想一些進一步澄清的認證過程,也許一些原因,我會得到,即使我跟隨一個未經驗證的消息在Facebook的開發網站上的步驟到T(至少這是假設)

任何幫助將是偉大的!

這裏是發送/接收模式:(這些鍵都被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 

如果有想用正確的鍵真正流的任何Facebook的人,給我一個聯繫地址和我將其發送給你。

回答