0
votes

I have created two facebook test accounts for my test application. Both test accounts have xmpp_login extended permissions. I am using SleekXMPP python library to connect (with second account) to the chat.facebook.com server. At the Resource Request phase (iq type="set" id="somethinghere" bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" iq) I will get JID of the first test account as a final JID as a response from the server, while I am trying to use the second account JID.

Is there some way to tell at iq stanza request phase to the chat server, that I am requesting some specific test account jid for my client (In the developers.facebook.com chat API example the options['uid'] is not used for anything) ? I would like to create few python clients with test accounts to my application which are communicating with actual browser users through chat.

Thanks a lot for help, -Mika

1

1 Answers

0
votes

Are you using the the X-FACEBOOK-PLATFORM authentication method? I.e., using:

self.credentials['api_key'] = '... API_KEY ...'
self.credentials['access_token'] = '... TOKEN ...' 

If so, Facebook provides the JID during binding based on the provided access token; there isn't a way to request a different one, and the initial JID provided when connecting is ignored. Are you certain that you're using different tokens for your accounts, and that it is the correct access token being used for your second account?

In the API documentation you mentioned, the options['uid'] is simply referring to the user's JID, in the form [email protected].

If you're just using the DIGEST-MD5 authentication option (i.e, not setting the credentials as above) then it's not clear where the issue is. Don't forget that you can join the [email protected] room for help debugging with Sleek in that case.

-- Lance