I m new to PHP and I can t figure out how to deal with Instagram APIs in order to (for example) extract a list of links to the standard resolution images by recent 3 items published by the user_id 3.
在我迄今创造的今天:
<?php
function get_instagram($user_id,$count)
{
$user_id = 3 ;
$count = 3 ;
$url = https://api.instagram.com/v1/users/ .$user_id. /media/recent/?access_token=13137.f59def8.1a759775695548999504c219ce7b2ecf&count= .$count;
$jsonData = $json_decode((file_get_contents($url)));
$data = $jsonData->data;
$result = <ul> ;
foreach ($data as $key => $value) {
$result .= <li><a href= .$value->link. ><img src=" .$value->images->standard_resolution->url. " width="70" height="70" /></a></li> ;
}
$result .= </ul> ;
return $result;
}
结果是,你能够帮助我?