summaryrefslogtreecommitdiff
path: root/scripts/update_facebook.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-01-11 08:33:28 +0000
committerZach Copley <zach@controlyourself.ca>2009-01-11 08:33:28 +0000
commita373e6f500e172fed02ea6c892b69af69da4f688 (patch)
tree438f470c8c26f2eddcd6d60a8d5ce7edc4966458 /scripts/update_facebook.php
parent689be142158dae5af1516cb38b947f0364d725dd (diff)
trac750 Automatically update Identi.ca profile box with user's latest dent
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++;
}
}