Get user details from whoever on facebook

<?php
        $data  =  file_get_contents('https://graph.facebook.com/{{ profileid }}');
        $data  =  json_decode($data);
        $id    =  $data->id;
        $name  =  $data->name;
        $first_name =  $data->first_name;
        $last_name = $data->last_name;
        $gender = $data->gender;
        $locale =  $data->locale;
        $username = $data->username;
        $pic_profile = 'https://graph.facebook.com/'.$data->username.'/picture?type=large';
?>
<br>
<?php
        echo '<img src='.$pic_profile.'><br/>';
        echo $id."<br/>";
        echo $name."<br/>";
        echo $first_name."<br/>";
        echo $last_name."<br/>";
        echo $gender."<br/>";
        echo $locale."<br/>";
        echo $username."<br/>";
?>
 -->