I use instagram real time updates for a tag to get notified when someone loses the environment with a specific tag. The subscription works fine, and I can directly verify the subscription using https://api.instagram.com/v1/subscriptions?client_secret= {cs} & client_id = {cid}
Inside the callback I have something like
if (isset ($_GET['hub_challenge'])){ echo $_GET['hub_challenge']; } else{ $my_string = file_get_contents('php://input'); $sub_update = json_decode($my_string);
}
But this callback is executed twice by instagram. For example, if I subscribe to a โwinterโ tag, and if someone publishes the media and marks it using this tag, instagram will send a notification twice to the reverse file i specified during the subscription (both calls are completed within a few seconds). Why send a callback request twice? Has anyone had a similar problem?
php instagram-api
cool
source share