0
해시 태그를 사용하여 이미지를 가져 오는 중 이미지 링크가 아닌 실제 Instagram 이미지 페이지의 직접 링크를 가져 오려고합니다. 이 링크 같은 : 어떤 도움을 주시면 감사하겠습니다PHP API를 사용하여 Instagram 이미지 페이지 링크 가져 오기
function callInstagram($url)
{
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => 2
));
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
// Set number of photos to show
// Set height and width for photos
$count = '9999';
$tag = 'mytag';
$url = 'https://api.instagram.com/v1/tags/'.$tag.'/media/recent?client_id=765390678573452431546477809798&count='.$count;
$inst_stream = callInstagram($url);
$results = json_decode($inst_stream, true);
foreach($results['data'] as $item){
$image_link = $item['images']['thumbnail']['url'];
$fullsize = $item['images']['standard_resolution']['url'];
echo '<a target="_blank" href="'.$fullsize.'"><img src="'.$image_link.'" /></a>';
}
: http://instagram.com/p/oRANLioVee/ 하지만 난 그렇게 할 수 없습니다, 여기 내 코드입니다. 비록 9999로 카운트를 설정했지만 33 개의 이미지가 있습니다. 의견이 있으십니까?
'max_id'와'min_id'는 나에게 혼란스럽지 않습니다. 어떻게 사용할 수 있습니까? – Amir