# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- /Users/johnrobens/NetBeansProjects/ecolsoc-photos/web/sites/all/modules/contrib/fb/fb_stream.admin.inc
+++ /Users/johnrobens/Downloads/fb/fb_stream.admin.inc
@@ -1,5 +1,6 @@
 <?php
 
+
 /**
  * Form callback for general settings.
  */
@@ -19,7 +20,8 @@
             '%user_name' => $from['name'],
             '%token' => $token,
           )));
-    } catch (Exception $e) {
+    }
+    catch (Exception $e) {
       fb_log_exception($e, t('Unable to query graph with fb_stream token.'));
       drupal_set_message(t('There was an error using the current access token, %token.  Consider generating a new token.', array(
             '%token' => $token,
@@ -29,7 +31,7 @@
 
   if (!empty($_REQUEST['code']) && empty($_POST)) {
     // Send user to this URL after token is generated.
-    $redirect_uri = url(request_path(), array(
+    $redirect_uri = url($_REQUEST['q'], array(
       'absolute' => TRUE,
       'query' => array(
         'client_id' => $_REQUEST['client_id'],
@@ -59,7 +61,7 @@
   );
   foreach (fb_get_all_apps() as $fb_app) {
     // Send user to this URL after token is generated.
-    $redirect_uri = url(request_path(), array(
+    $redirect_uri = url($_REQUEST['q'], array(
       'absolute' => TRUE,
       'query' => array(
         'client_id' => $fb_app->id,
@@ -92,7 +94,7 @@
       'client_id' => $app_id,
       'client_secret' => $fb_app->secret,
       'code' => $code,
-      'redirect_uri' => $redirect_uri,
+                  'redirect_uri' =>$redirect_uri,
     ),
       ));
   $http = drupal_http_request($path);
