$_SESSION["authenticated"] = true;
$_SESSION["uid"] = $uid;
+ unset($_REQUEST);
$_REQUEST["type"] = "wall";
$_REQUEST["api_source"] = true;
$_REQUEST["profile_uid"] = $uid;
$_REQUEST["source"] = "Facebook";
+ $_REQUEST["title"] = "";
+
$_REQUEST["body"] = (isset($item->message) ? escape_tags($item->message) : '');
if(isset($item->name) and isset($item->link))
$_SESSION['authenticated'] = true;
$_SESSION['uid'] = $uid;
+ unset($_REQUEST);
$_REQUEST['type'] = 'wall';
$_REQUEST['api_source'] = true;
);
};
-
+
function public_server_cron($a,$b) {
+ logger("public_server: cron start");
+
require_once('include/enotify.php');
$r = q("select * from user where account_expires_on < UTC_TIMESTAMP() + INTERVAL 5 DAY and account_expires_on > '0000-00-00 00:00:00' and
expire_notification_sent = '0000-00-00 00:00:00' ");
}
}
+ logger("public_server: cron end");
}
$client->client_id = $consumer_key;
$client->client_secret = $consumer_secret;
+ $username = $user.'@'.$host;
+
$success = $client->CallAPI(
'https://'.$host.'/api/user/'.$user.'/feed',
'POST', $params, array('FailOnAccessError'=>true, 'RequestContentType'=>'application/json'), $user);
if($success)
- logger('pumpio_send: success');
+ logger('pumpio_send '.$username.': success');
else
- logger('pumpio_send: general error: ' . print_r($user,true));
+ logger('pumpio_send '.$username.': general error: ' . print_r($user,true));
}
}
logger('pumpio: fetching for user '.$uid.' '.$url.' C:'.$client->client_id.' CS:'.$client->client_secret.' T:'.$client->access_token.' TS:'.$client->access_token_secret);
+ $username = $user.'@'.$host;
+
$success = $client->CallAPI($url, 'GET', array(), array('FailOnAccessError'=>true), $user);
if (!$success) {
- logger('pumpio: error fetching posts for user '.$uid." ".print_r($user, true));
+ logger('pumpio: error fetching posts for user '.$uid." ".$username." ".print_r($user, true));
return;
}
$_SESSION["authenticated"] = true;
$_SESSION["uid"] = $uid;
+ unset($_REQUEST);
$_REQUEST["type"] = "wall";
$_REQUEST["api_source"] = true;
$_REQUEST["profile_uid"] = $uid;
if ($post->object->displayName != "")
$_REQUEST["title"] = html2bbcode($post->object->displayName);
+ else
+ $_REQUEST["title"] = "";
$_REQUEST["body"] = html2bbcode($post->object->content);
if ($first_time)
continue;
+ if ($post->source == "activity")
+ continue;
+
if (is_object($post->retweeted_status))
continue;
$_SESSION["authenticated"] = true;
$_SESSION["uid"] = $uid;
+ unset($_REQUEST);
$_REQUEST["type"] = "wall";
$_REQUEST["api_source"] = true;
$_REQUEST["profile_uid"] = $uid;
//$_REQUEST["date"] = $post->created_at;
+ $_REQUEST["title"] = "";
+
$_REQUEST["body"] = $post->text;
if (is_string($post->place->name))
$_REQUEST["location"] = $post->place->name;
$_SESSION["authenticated"] = true;
$_SESSION["uid"] = $uid;
+ unset($_REQUEST);
$_REQUEST["type"] = "wall";
$_REQUEST["api_source"] = true;
$_REQUEST["profile_uid"] = $uid;
//$_REQUEST["date"] = $post->created_at;
+ $_REQUEST["title"] = "";
+
$_REQUEST["body"] = $post->text;
if (is_string($post->place->name))
$_REQUEST["location"] = $post->place->name;