1

我对 Instagram 上的任何人都不抱太大希望,但谁知道呢……

你们使用来自 Instagram的实时照片更新吗?我从未收到用户媒体更新。我成功订阅了它,Instagram 向我的服务器发送 HTTP GET 确认调用,我重播了该调用,之后再也没有收到任何更新。

想法?

4

1 回答 1

0

更新出现在正文中,而不是在 POST 中......那么你必须做一些技巧来获得它:

$file = fopen("data.txt","a");
fwrite($file,"\r\n- - - - - - - - - - - - - ".date('Y-m-d H:i:s')." \r\n");
if (count($_GET)>0)
    fwrite($file,"\r\nGET:\r\n".print_r($_GET,true));
if (count($_POST)>0)
    fwrite($file,"\r\nPOST:\r\n".print_r($_POST,true));
$handle = fopen('php://input','r');
$jsonInput = fgets($handle);
$decoded = json_decode($jsonInput,true);
fwrite($file,"\r\nINPUT DECODED:\r\n".print_r($decoded,true));
fclose($file);
于 2014-11-02T19:16:49.503 回答