Index: fb_devel.module
===================================================================
--- fb_devel.module	(revision 4629)
+++ fb_devel.module	(working copy)
@@ -603,7 +603,7 @@
     }

     // Tests for link on canvas pages (iframe cookie test)
-    //$link_test = url(fb_scrub_urls($_REQUEST['q']), array('absolute' => TRUE));
+    //$link_test = url(fb_scrub_urls(request_path()), array('absolute' => TRUE));
     //$info['link test'] = "<a href=\"$link_test\">link test (processed)</a>";
     //$info['link test 2'] = "<a href='$link_test'>link test (not processed)</a>";

Index: fb_graph.module
===================================================================
--- fb_graph.module	(revision 4629)
+++ fb_graph.module	(working copy)
@@ -118,7 +118,7 @@
       $id = $result['id'];
       $message_args = array(
         '!delete_url' => url(FB_GRAPH_PATH_DELETE . '/' . $id, array(
-                               'destination' => $_GET['q'],
+                               'destination' => request_path(),
                              )),
         '%action_type' => $action_type,
         '!profile_url' => 'https://www.facebook.com/' . $fbu, // without a graph query, best URL we can get.
Index: fb_stream.admin.inc
===================================================================
--- fb_stream.admin.inc	(revision 4629)
+++ fb_stream.admin.inc	(working copy)
@@ -31,7 +31,7 @@

   if (!empty($_REQUEST['code']) && empty($_POST)) {
     // Send user to this URL after token is generated.
-    $redirect_uri = url($_REQUEST['q'], array(
+    $redirect_uri = url(request_path(), array(
                           'absolute' => TRUE,
                           'query' => array(
                             'client_id' => $_REQUEST['client_id'],
@@ -61,7 +61,7 @@
   );
   foreach (fb_get_all_apps() as $fb_app) {
     // Send user to this URL after token is generated.
-    $redirect_uri = url($_REQUEST['q'], array(
+    $redirect_uri = url(request_path(), array(
                           'absolute' => TRUE,
                           'query' => array(
                             'client_id' => $fb_app->id,
@@ -107,4 +107,3 @@
     }
   }
 }
-
Index: fb_url_rewrite.inc
===================================================================
--- fb_url_rewrite.inc	(revision 4629)
+++ fb_url_rewrite.inc	(working copy)
@@ -48,12 +48,11 @@
  * For internal use only (see fb_session.inc).
  */
 function _fb_settings_parse($key) {
-  // XXX will this $_GET[q] stuff still work in D7???
-  if (isset($_GET['q'])) {
-    $path = $_GET['q'];
+  // TODO: confirm this working in D7
+  if ($path = request_path()) {
     $pos = strpos($path, $key . '/');
     if ($pos !== FALSE) {
-      // Too soon for arg() function.
+      // Too soon for arg() function. (Actually in D7 no longer true.  We could use arg() here.)
       $args = explode('/', $path);
       $i = 0;
       while (isset($args[$i]) && isset($args[$i+1])) {
@@ -166,4 +165,3 @@

   $result = $path;
 }
-
