Heloo,
I am working on one project and I need real time updates from Instagram for certain tag.
This is my code for Create a Subscription
&l
Instagram Realtime API subscription will only let you know when there has been an update to your subscribed object, not what the update is. Once you receive a notification, it is up to you to make a call to the API (in your case probably https://api.instagram.com/v1/tags/winter/media/recent ) and to see what the new content is.
Depending on the volume of changes, you will probably want to batch these calls up at certain time intervals, but the below should be a good start. You'll also probably only want to retrieve items you haven't already retrieved.
$v) // can be multiple updates per call
{
$recent_data = file_get_contents('https://api.instagram.com/v1/tags/'.$sub_update->object_id.'/media/recent?access_token='.$access_token);
file_put_contents('activity.log', serialize($recent_data->data), FILE_APPEND | LOCK_EX);
}
}
?>