$url = "https://graph.facebook.com/".$post_to_page."/feed?access_token=".$access_token;
+ $first_time = ($lastcreated == "");
+
if ($lastcreated != "")
$url .= "&since=".urlencode($lastcreated);
if ($item->created_time > $lastcreated)
$lastcreated = $item->created_time;
+ if ($first_time)
+ continue;
+
if ($item->application->id == get_config('facebook','appid'))
continue;
$parameters = array("exclude_replies" => true, "trim_user" => true, "contributor_details" => false, "include_rts" => false);
+ $first_time = ($lastid == "");
+
if ($lastid <> "")
$parameters["since_id"] = $lastid;
if ($post->id > $lastid)
$lastid = $post->id;
+ if ($firsttime)
+ continue;
+
if (is_object($post->retweeted_status))
continue;
$parameters = array("exclude_replies" => true, "trim_user" => true, "contributor_details" => false, "include_rts" => false);
+ $first_time = ($lastid == "");
+
if ($lastid <> "")
$parameters["since_id"] = $lastid;
if ($post->id_str > $lastid)
$lastid = $post->id_str;
+ if ($firsttime)
+ continue;
+
if (!strpos($post->source, $application_name)) {
$_SESSION["authenticated"] = true;
$_SESSION["uid"] = $uid;