[SideBarGit@SublimeText fbconnect/] git diff HEAD --no-color -- .

# Improve this command, the output or the tab title by posting here:
# http://www.sublimetext.com/forum/viewtopic.php?f=5&t=3405
# Tip: F5 will run the command again and refresh the contents of this tab

diff --git a/fbconnect.admin.inc b/fbconnect.admin.inc
index 373f898..7b5845c 100644
--- a/fbconnect.admin.inc
+++ b/fbconnect.admin.inc
@@ -48,6 +48,12 @@ function fbconnect_api_keys_settings($form, &$form_state) {
     }
   }

+  $form['fbconnect_scope'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Scope'),
+    '#description' => t('The Facebook permissions to request. Separate multiple values with commas.'),
+    '#default_value' => variable_get('fbconnect_scope', 'email'),
+  );
+
   $form['fbconnect_debug'] = array(
     '#type' => 'checkbox',
     '#title' => t('Debug mode'),
diff --git a/fbconnect.js b/fbconnect.js
index 292301d..34d87e2 100644
--- a/fbconnect.js
+++ b/fbconnect.js
@@ -95,7 +95,7 @@ Drupal.fbconnect.DoFastRegistration =  function(link) {
         }
       });
     }
-  }, {scope:'email'});
+  }, {scope:'email'}); // @todo: integrate with variable_get('fbconnect_scope', 'email')
 };


diff --git a/fbconnect.module b/fbconnect.module
index c34cf7f..ec208e6 100644
--- a/fbconnect.module
+++ b/fbconnect.module
@@ -1012,7 +1012,7 @@ function theme_fbconnect_login_button($variables) {
     return '<h3>' . $title . '</h3>' . $desc . $link;
   }
   else {
-    $attr['data-scope'] = "email";
+    $attr['data-scope'] = variable_get('fbconnect_scope', 'email');
     $button = '<fb:login-button ' . drupal_attributes($attr) . '>' . $text . '</fb:login-button>';
     return $button;
   }
