]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
FacebookBridge - Add lots of debug output (revert me)
authorZach Copley <zach@status.net>
Thu, 24 Feb 2011 20:59:37 +0000 (12:59 -0800)
committerZach Copley <zach@status.net>
Thu, 24 Feb 2011 20:59:37 +0000 (12:59 -0800)
plugins/FacebookBridge/lib/facebookclient.php
plugins/FacebookBridge/lib/facebookqueuehandler.php

index 80e333182420c42701de1121868e81c9d75bfdc5..da8c95c9f2dfdf14e6a8b7c6c5845520a2810fc4 100644 (file)
@@ -128,6 +128,7 @@ class Facebookclient
      */
     static function facebookBroadcastNotice($notice)
     {
+        common_debug("ZZZZZ facebookBroadcastNotice() - entered ", __FILE__);
         $client = new Facebookclient($notice);
         return $client->sendNotice();
     }
@@ -137,6 +138,8 @@ class Facebookclient
      */
     function isFacebookBound() {
 
+        common_debug("ZZZZZ isFacebookBound() - entered", __FILE__);
+
         if (empty($this->flink)) {
             // User hasn't setup bridging
             return false;
@@ -175,6 +178,14 @@ class Facebookclient
             return true;
         }
 
+        common_debug(
+            sprintf(
+                "ZZZZZ isFacebookBound() - notice %d this notice does not go to Facebook",
+                $this->notice->id
+            ),
+            __FILE__
+        );
+
         return false;
     }
 
index 1e82ff01b1845f43b956dbd0bc4415defa3da1ac..f1e857090bc8ee300d0d68bcfdc40a4bcb1aa138 100644 (file)
@@ -40,9 +40,35 @@ class FacebookQueueHandler extends QueueHandler
 
     function handle($notice)
     {
+        common_debug(
+            sprintf(
+                'ZZZZZ handle() - Looking at notice %d',
+                $notice->id
+            ),
+            __FILE__
+        );
+
         if ($this->_isLocal($notice)) {
+
+            common_debug(
+                sprintf(
+                    'ZZZZZ handle() - notice %d is local; will try sending to Facebook.',
+                    $notice->id
+                ),
+                __FILE__
+            );
+
             return Facebookclient::facebookBroadcastNotice($notice);
         }
+
+        common_debug(
+            sprintf(
+                'ZZZZZ handle() - notice %d was not a local notice, so we wont rebroadcast it.',
+                $notice->id
+            ),
+            __FILE__
+        );
+
         return true;
     }