Permalink
Browse files

1. Updating the post-authentication redirect from http://www.facebook…

….com/ (which will soon not be supported) to http://www.facebook.com/connect/login_success.html

2. Adding a redirect to ://www.facebook.com after an access_token is received in the redirect URI
  • Loading branch information...
1 parent 92ea058 commit c85c769053c8ce0f6778ec02791d86510f373f84 @eugenezar eugenezar committed Nov 27, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −1 chrome/content/lib.js
  2. +4 −3 chrome/content/toolbar.js
View
@@ -757,7 +757,7 @@ var fbLib = {
}
else */{
//prefSvc.setIntPref('extensions.facebook.permissions.level', 0);
- var askUrl = "https://www.facebook.com/dialog/oauth?client_id=" + fbSvc.wrappedJSObject._appId + "&redirect_uri=http://www.facebook.com/&scope=manage_notifications,user_photos,publish_stream,status_update,friends_status&response_type=token";
+ var askUrl = "https://www.facebook.com/dialog/oauth?client_id=" + fbSvc.wrappedJSObject._appId + "&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=manage_notifications,user_photos,publish_stream,status_update,friends_status&response_type=token";
gBrowser.selectedTab = gBrowser.addTab(askUrl);
}
}
@@ -466,7 +466,8 @@ var facebook = {
{
fbLib.debug( "onAuthIframeLoad: have access token : " + tup[1]);
fbSvc.sessionStartOAuth(tup[1]);
- fbLib.debug( "onAuthIframeLoad: finished session start");
+ fbLib.debug( "onAuthIframeLoad: finished session start. Redirecting to Facebook.");
+ content.document.location = "https://www.facebook.com";
}
}
}
@@ -512,7 +513,7 @@ var facebook = {
}
}
- gBrowser.selectedTab = gBrowser.addTab("https://www.facebook.com/dialog/oauth?client_id=" + fbSvc.wrappedJSObject._appId + "&redirect_uri=http://www.facebook.com/&scope=manage_notifications,user_photos,publish_stream,status_update,friends_status&response_type=token");
+ gBrowser.selectedTab = gBrowser.addTab("https://www.facebook.com/dialog/oauth?client_id=" + fbSvc.wrappedJSObject._appId + "&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=manage_notifications,user_photos,publish_stream,status_update,friends_status&response_type=token");
facebook.forceUIOff(true);
prefSvc.setBoolPref('extensions.facebook.permissions.asked', true);
@@ -715,7 +716,7 @@ var facebook = {
fbLib.setAttributeById('facebook-auth-iframe', 'src', "about:blank");
- fbLib.setAttributeById('facebook-auth-iframe', 'src', "https://www.facebook.com/dialog/oauth?client_id=" + fbSvc.wrappedJSObject._appId + "&redirect_uri=http://www.facebook.com/&scope=manage_notifications,user_photos,publish_stream,status_update,friends_status&response_type=token");
+ fbLib.setAttributeById('facebook-auth-iframe', 'src', "https://www.facebook.com/dialog/oauth?client_id=" + fbSvc.wrappedJSObject._appId + "&redirect_uri=http://www.facebook.com/connect/login_success.html&scope=manage_notifications,user_photos,publish_stream,status_update,friends_status&response_type=token");
},
unload: function() {

0 comments on commit c85c769

Please sign in to comment.