Respect access_token if passed in.
authorDave Cohen
Thu, 4 Aug 2011 15:41:43 +0000 (08:41 -0700)
committerDave Cohen
Thu, 4 Aug 2011 15:41:43 +0000 (08:41 -0700)
fb.module

index 297f96f..bb13fdc 100644 (file)
--- a/fb.module
+++ b/fb.module
@@ -484,7 +484,9 @@ function fb_get_token($fb = NULL, $fbu = NULL) {
  * eliminating the need for it entirely.
  */
 function fb_call_method($fb, $method, $params = array()) {
-  $params['access_token'] = fb_get_token($fb);
+  if (!isset($params['access_token'])) {
+    $params['access_token'] = fb_get_token($fb);
+  }
   $params['format'] = 'json-strings';
 
   // Here's how to create a url that conforms to standards: