summaryrefslogtreecommitdiff
path: root/scripts/update_facebook.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/update_facebook.php')
-rwxr-xr-xscripts/update_facebook.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/update_facebook.php b/scripts/update_facebook.php
index 15c0e49f8..2a1251f37 100755
--- a/scripts/update_facebook.php
+++ b/scripts/update_facebook.php
@@ -31,7 +31,7 @@ require_once(INSTALLDIR . '/lib/common.php');
require_once(INSTALLDIR . '/lib/facebookutil.php');
// For storing the last run date-time
-$last_updated_file = "/home/zach/laconica/scripts/facebook_last_updated";
+$last_updated_file = INSTALLDIR . '/scripts/facebook_last_updated';
// Lock file name
$tmp_file = "/tmp/update_facebook.lock";
@@ -54,7 +54,8 @@ $cnt = 0;
while($notice->fetch()) {
- $flink = Foreign_link::getByUserID($notice->profile_id, 2);
+ $flink = Foreign_link::getByUserID($notice->profile_id, FACEBOOK_SERVICE);
+ $user = $flink->getUser();
$fbuid = $flink->foreign_id;
$content = $notice->content;
@@ -64,6 +65,7 @@ while($notice->fetch()) {
if (!preg_match('/@[a-zA-Z0-9_]{1,15}\b/u', $content) ||
(($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY)) {
update_status($fbuid, $content);
+ update_profile_box($facebook, $fbuid, $user, $notice);
$cnt++;
}
}