0
我想通過json響應來獲取「網址」的instagram網頁圖片。Instagram的API - JSON響應未定義索引
這是我的代碼看起來如何,但我總是得到錯誤消息:「未定義的索引:圖像」 有人可以幫助我嗎? :)
<?php
// Get data from Instagram User
$url = "https://www.instagram.com/wsj/media/";
$instagramdata = @file_get_contents($url);
$instagramdata = json_decode($instagramdata, true);
{
$instagramfeed = $instagramdata['items']['images']['standard_resolution']['url'];
}
?>
<div class="instagramfeed">
<?php echo $instagramfeed; ?>
</div>
非常感謝!很好的例子和完美的作品:)) – N1njaWTF