使用instgram实时订阅。我试图保存基于订阅ID返回的图像链接。活动日志仅捕获“N”,而不捕获图像链接。我做错了什么。
<?php
if (isset ($_GET['hub_challenge'])){
echo $_GET['hub_challenge'];
}
else{
$myString = file_get_contents('php://input');
$sub_update = json_decode($myString);
$access_token = 'xxxxx';
foreach($sub_update as $k => $v) // can be multiple updates per call
{ $objid = $v->object_id;
$recent_data = file_get_contents('https://api.instagram.com/v1/tags/'.$objid.'/media/recent?access_token='.$access_token);
$results=$results['data'];
$image_link = $results['images']['standard_resolution']['url'];
file_put_contents('activity.log', serialize($image_link), FILE_APPEND | LOCK_EX);
}
}
?>