3v4l.org

run code in 300+ PHP versions simultaneously
<?php $page_id = '189147671108377'; $page_access_token = '488543067934739|nMZH2r92f-6j2amnWaAUIrQZHlg'; $json = file_get_contents('https://graph.facebook.com/'.$page_id.'/posts?access_token='.$page_access_token); $data = json_decode($json); /* There are multiple properties which contain links, pictures, etc. of that particular status var_dump($data) to see all available properties. */ $posts = array(); foreach ($data->data as $post) { $posts[] = array( 'messgage' => $post->message, 'picture' => $post->picture, 'link' => $post->link, 'description' => $post->description ); // get the last 10 statuses if (count($posts) == 10) break; else continue; }

preferences:
78.89 ms | 402 KiB | 5 Q