]> git.mxchange.org Git - friendica-addons.git/blobdiff - fbpost/fbpost.php
Facebook: Better check for empty posts, performance improvement when syncing.
[friendica-addons.git] / fbpost / fbpost.php
index f0b763cd3ece54a3f6e54d135485b2aeb9ded691..7c10d7c3b333511d4765db3db29082eda56d25d4 100644 (file)
@@ -1095,7 +1095,7 @@ function fbpost_fetchwall($a, $uid) {
                        }
 
                        if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') {
-                               logger('facebook: empty body 2 '.$item->id.' '.print_r($item, true));
+                               logger('facebook: empty body 1 '.$item->id.' '.print_r($item, true));
                                continue;
                        }
 
@@ -1115,7 +1115,7 @@ function fbpost_fetchwall($a, $uid) {
                }
 
                if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') {
-                       logger('facebook: empty body '.$item->id.' '.print_r($item, true));
+                       logger('facebook: empty body '.$item->id.' '.print_r($item, true));
                        continue;
                }
 
@@ -1151,6 +1151,11 @@ function fbpost_fetchwall($a, $uid) {
                                                .' '.substr($item->place->location->longitude, 0, 8);
                }
 
+               if(trim($_REQUEST["body"]) == '') {
+                       logger('facebook: empty body 3 '.$item->id.' '.print_r($item, true));
+                       continue;
+               }
+
                //print_r($_REQUEST);
                logger('facebook: posting for user '.$uid);
                item_post($a);