Instagram API实时照片更新不起作用


Instagram API Real-time Photo Update not working

我正在使用Instagram的实时照片URL(http://instagram.com/developer/realtime/),我可以成功订阅,因为它返回以下详细信息:

Array
(
    [meta] => Array
        (
            [code] => 200
        )
    [data] => Array
        (
            [object] => user
            [object_id] => 
            [aspect] => media
            [callback_url] => http://example.com/instagram/
            [type] => subscription
            [id] => 123456
        )
)

但是当用户上传一张新照片时,我的回调url上不会发送更新。这是我回调URL上的代码:

mail("myemail@gmail.com","im here","I entered here"); #check if it really does enter here    
if(isset($_GET['hub_challenge']))
{
    echo $_GET['hub_challenge'];
}
else
{
    #It should enter here if user uploads a new photo
    $data = file_get_contents('php://input');
    $data = json_decode($data);
    ...some of my codes...brevity...
}

我注意到我没有收到更新,因为正如你在我的代码中看到的,每次我的回调url上发生什么事情,它都会给我发电子邮件。所以我没有收到任何电子邮件,即使我已经检查了我的垃圾邮件文件夹。

instagram实时照片更新API真的关闭了吗?或者我有什么事要做?

我们将非常感谢您的帮助!谢谢!:)

有必要通过授权APIinstagram或按照授权应用程序文档中指定的链接

https://api.instagram.com/oauth/authorize/?client_id=client-id&redirect_uri=redirect-uri&response_type=代码

之后,POST请求开始出现在回调url