adium 4244:982e401f8d00: Fix connecting to Facebook by sending t...

commits at adium.im commits at adium.im
Mon Oct 24 04:06:36 UTC 2011


details:	http://hg.adium.im/adium/rev/982e401f8d00
revision:	4244:982e401f8d00
branch:		(none)
author:		Frank Dowsett <wixardy at adium.im>
date:		Mon Oct 24 00:05:44 2011 -0400

Fix connecting to Facebook by sending the now encrypted OAuth token instead of the soon-to-be-deprecated session_key. Fixes #15544

diffs (49 lines):

diff -r 2e10c2e3fee2 -r 982e401f8d00 ChangeLogs/Changes Between Betas.txt
--- a/ChangeLogs/Changes Between Betas.txt	Sun Oct 23 13:56:50 2011 -0700
+++ b/ChangeLogs/Changes Between Betas.txt	Mon Oct 24 00:05:44 2011 -0400
@@ -3,4 +3,5 @@
  * Fixed a shadow drawing error under 64 bit in PSMTabBarController
  * Fix issue where the user count was not updated when the user list is dragged open. (#15446)
  * Fix issue where the state of the user list was not preserved when the user list is dragged open or closed.
- 
\ No newline at end of file
+ * Fix connecting to Facebook using OAuth. (#15544)
+ 
diff -r 2e10c2e3fee2 -r 982e401f8d00 Plugins/Purple Service/AIFacebookXMPPAccount.m
--- a/Plugins/Purple Service/AIFacebookXMPPAccount.m	Sun Oct 23 13:56:50 2011 -0700
+++ b/Plugins/Purple Service/AIFacebookXMPPAccount.m	Mon Oct 24 00:05:44 2011 -0400
@@ -411,7 +411,7 @@
 														  error:NULL];
 	 */
 	
-	NSString *sessionKey = [[[self oAuthToken] componentsSeparatedByString:@"|"] objectAtIndex:1];
+	NSString *sessionKey = [self oAuthToken];
 	[[adium accountController] setPassword:sessionKey forAccount:self];
 
 	/* When we're newly authorized, connect! */
diff -r 2e10c2e3fee2 -r 982e401f8d00 Plugins/Purple Service/libpurple_extensions/auth_fb.c
--- a/Plugins/Purple Service/libpurple_extensions/auth_fb.c	Sun Oct 23 13:56:50 2011 -0700
+++ b/Plugins/Purple Service/libpurple_extensions/auth_fb.c	Mon Oct 24 00:05:44 2011 -0400
@@ -105,7 +105,7 @@
 	request = purple_fbapi_construct_request(purple_connection_get_account(js->gc),
 											 method,
 											 "v", "1.0",
-											 "session_key", purple_connection_get_password(js->gc),
+											 "access_token", purple_connection_get_password(js->gc),
 											 "nonce", nonce,
 											 NULL);
 	g_free(method);
diff -r 2e10c2e3fee2 -r 982e401f8d00 Plugins/Purple Service/libpurple_extensions/fbapi.c
--- a/Plugins/Purple Service/libpurple_extensions/fbapi.c	Sun Oct 23 13:56:50 2011 -0700
+++ b/Plugins/Purple Service/libpurple_extensions/fbapi.c	Mon Oct 24 00:05:44 2011 -0400
@@ -262,8 +262,8 @@
 		value = va_arg(args, const char *);
 		g_tree_insert(params, (char *)key, (char *)value);
 
-		/* If we have a session_key then we need a call_id */
-		if (g_str_equal(key, "session_key")) {
+		/* If we have an access_token then we need a call_id */
+		if (g_str_equal(key, "access_token")) {
 			struct timeval tv;
 			if (gettimeofday(&tv, NULL) != 0) {
 				time_t now;




More information about the commits mailing list