1

I'm new in php. I make below code to get facebook album photos fbid. Its working and showing me FBID but showing me in array.

Array results has this ID: [id] => 100923570620044 and Time: [created_time] => 2017-08-04T12:43:02+0000

I wants to show only FBID on html code...

such as:

<div style="background:black;color:white;">ID: 100923570620044 </div>

Or,

<a href="100923570620044">Here</a>

I tried it... But i can't do it.

My Code:

<?php
$token="FACEBOOK ACCESS TOKEN";
$data = file_get_contents("https://graph.facebook.com/100922980620103/photos?fields=id&access_token=$token");
echo "<pre>";
print_r( json_decode($data, true) );
echo "</pre>";
?>

How to i get only ID on html code. Please help me. thanks.

Masud Rana
  • 33
  • 3

0 Answers0