$feed = fetch_url($url);
$data = json_decode($feed);
+
+ if (!is_array($data->data))
+ return;
+
$items = array_reverse($data->data);
foreach ($items as $item) {
$post .= "\n[url=".$thumb->url."][img]".$image."[/img][/url]\n";
}
break;
+ case "audio":
+ $post .= "\n\n[bookmark=".$attachment->url."]".fromgplus_html2bbcode($attachment->displayName)."[/bookmark]\n";
+ break;
//default:
// die($attachment->objectType);
}
$lastdate = 0;
+ if (!is_array($activities->items))
+ return;
+
$reversed = array_reverse($activities->items);
foreach($reversed as $item) {
$parameters["since_id"] = $lastid;
$items = $connection->get('statuses/user_timeline', $parameters);
+
+ if (!is_array($items))
+ return;
+
$posts = array_reverse($items);
if (count($posts)) {
$parameters["since_id"] = $lastid;
$items = $connection->get('statuses/user_timeline', $parameters);
+
+ if (!is_array($items))
+ return;
+
$posts = array_reverse($items);
if (count($posts)) {