facebookauthenticationfacebook-chatx-facebook-platform

X-FACEBOOK-PLATFORM inconsistency using different applications


I've successfully implemented an XMPP client with X-FACEBOOK-PLATFORM auth support, and can currently connect any user to chat.

After that, I needed to create a different application with chat access and I reused the code by changing the App ID and App Secret to those of the new app. My surprise is to find that some of the users that can successfully login with my older app are not able to do so with the new one!! (weird).

I've checked both application configurations and are alike, with the sole difference that the "Forces use of login secret for OAuth call and for auth.login" is NOT available in the new application, whilst it is set to "Disabled" in the old one. Both application were created using the same Facebook account.

Can anyone explain where did this option go and if it is key for the chat to work? Furthermore, any thoughts on what else could be wrong?

Thank you!


Solution

  • There! I figured it out! Looks like the "inconsistency" is very consistent. The users that still are able to connect are those with a short fb_user_id (those with 9 digit ids). Users with the new 15 digit ids were consistently triggering a bug in iksemel the underlying xmpp library, where md5 hashing data with a length multiple of 64 will yield the wrong result.

    We have filed a bug report for both, google-code and google-group for iksemel, here are the links:

    http://code.google.com/p/iksemel/issues/detail?id=32

    http://groups.google.com/group/iksemel/browse_thread/thread/4079f329718f55c