aboutsummaryrefslogtreecommitdiffstats
path: root/addon/facebook/facebook.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-27 17:06:42 -0700
committerFriendika <info@friendika.com>2011-04-27 17:06:42 -0700
commit64b12e3424f4d480a5d2cc0b2f49eb5133c9530a (patch)
tree9cf66ea7eab5e936c0a70cf0808b9516b5e5c63f /addon/facebook/facebook.php
parentbd65c0c7b2c25f766da7f6a85124e003b2ffd93d (diff)
downloadvolse-hubzilla-64b12e3424f4d480a5d2cc0b2f49eb5133c9530a.tar.gz
volse-hubzilla-64b12e3424f4d480a5d2cc0b2f49eb5133c9530a.tar.bz2
volse-hubzilla-64b12e3424f4d480a5d2cc0b2f49eb5133c9530a.zip
ensure contact exists for toplevel post
Diffstat (limited to 'addon/facebook/facebook.php')
-rw-r--r--addon/facebook/facebook.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index c2ccfa131..76bf878b5 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -227,6 +227,12 @@ function facebook_content(&$a) {
notice( t('Facebook disabled') . EOL);
}
+ if($a->argc > 1 && $a->argv[1] === 'friends') {
+ fb_get_friends(local_user());
+ notice( t('Updating contacts') . EOL);
+ }
+
+
$fb_installed = get_pconfig(local_user(),'facebook','post');
$appid = get_config('facebook','appid');
@@ -595,6 +601,12 @@ function fb_consume_stream($uid,$j,$wall = false) {
if(count($r))
$datarray['contact-id'] = $r[0]['id'];
}
+
+ // don't store post if we don't have a contact
+
+ if(! x($datarray,'contact-id'))
+ continue;
+
$datarray['verb'] = ACTIVITY_POST;
if($wall) {
$datarray['owner-name'] = $self[0]['name'];