]> git.mxchange.org Git - friendica-addons.git/commitdiff
Workaround for posts from pages. Not nice - but working :)
authorMichael <icarus@dabo.de>
Mon, 20 Feb 2012 10:14:33 +0000 (11:14 +0100)
committerMichael <icarus@dabo.de>
Mon, 20 Feb 2012 10:14:33 +0000 (11:14 +0100)
facebook/facebook.php

index f155d39728e6303e2859016ee4cff7196608eb28..39013402c95a620263172c3241820e1dee892ede 100755 (executable)
@@ -731,7 +731,7 @@ function facebook_post_hook(&$a,&$b) {
                                logger('facebook: postvars: ' . print_r($postvars,true));
 
                                // "test_mode" prevents anything from actually being posted.
-                               // Otherwise, let's do it. 
+                               // Otherwise, let's do it.
 
                                if(! get_config('facebook','test_mode')) {
                                        $x = post_url($url, $postvars);
@@ -952,11 +952,13 @@ function fb_consume_stream($uid,$j,$wall = false) {
                        // don't store post if we don't have a contact
 
                        if(! x($datarray,'contact-id')) {
-                               logger('no contact: post ignored');
-                               continue; 
+                               // Test: Workaround for page entries
+                               $datarray['contact-id'] = $self[0]['id'];
+                               //logger('no contact: post ignored');
+                               //continue;
                        }
 
-                       $datarray['verb'] = ACTIVITY_POST;                                              
+                       $datarray['verb'] = ACTIVITY_POST;
                        if($wall) {
                                $datarray['owner-name'] = $self[0]['name'];
                                $datarray['owner-link'] = $self[0]['url'];