summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-05-25 11:04:46 -0700
committerLance Stout <lancestout@gmail.com>2012-05-25 11:04:46 -0700
commitd1ad31696e9c59cbb7389317585e2d1a7a397e94 (patch)
treec2fbd603c7b58406e46a4930c181c415eb8507e5
parentf49311ef9ee76c2e4cce402e377867eff308aca0 (diff)
downloadslixmpp-d1ad31696e9c59cbb7389317585e2d1a7a397e94.tar.gz
slixmpp-d1ad31696e9c59cbb7389317585e2d1a7a397e94.tar.bz2
slixmpp-d1ad31696e9c59cbb7389317585e2d1a7a397e94.tar.xz
slixmpp-d1ad31696e9c59cbb7389317585e2d1a7a397e94.zip
Fix X-FACEBOOK-PLATFORM mechanism to work with Python3.
-rw-r--r--sleekxmpp/thirdparty/suelta/mechanisms/facebook_platform.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/sleekxmpp/thirdparty/suelta/mechanisms/facebook_platform.py b/sleekxmpp/thirdparty/suelta/mechanisms/facebook_platform.py
index cb0f09d5..af6a78eb 100644
--- a/sleekxmpp/thirdparty/suelta/mechanisms/facebook_platform.py
+++ b/sleekxmpp/thirdparty/suelta/mechanisms/facebook_platform.py
@@ -22,13 +22,17 @@ class X_FACEBOOK_PLATFORM(Mechanism):
values[key] = value
resp_data = {
- b'method': values[b'method'],
- b'v': b'1.0',
- b'call_id': b'1.0',
- b'nonce': values[b'nonce'],
- b'access_token': self.values['access_token'],
- b'api_key': self.values['api_key']
+ 'method': values[b'method'],
+ 'v': '1.0',
+ 'call_id': '1.0',
+ 'nonce': values[b'nonce'],
+ 'access_token': self.values['access_token'],
+ 'api_key': self.values['api_key']
}
+
+ for k, v in resp_data.items():
+ resp_data[k] = bytes(v).decode('utf-8')
+
resp = '&'.join(['%s=%s' % (k, v) for k, v in resp_data.items()])
return bytes(resp)
return b''