JSON数组输出:
array(3) {
["pagination"]=>
array(0) {
}
["meta"]=>
array(1) {
["code"]=>
int(200)
}
["data"]=>
array(9) {
[0]=> // for first image
array(15) {
["attribution"]=>
NULL
["tags"]=>
array(3) {
[0]=>
string(17) "düğündernekvol"
[1]=>
string(7) "brother"
[2]=>
string(4) "suit"
}
["likes"]=> //total likes count for instagram
array(1) {
["count"]=>
int(40)
}
PHP代码
if(isset($json_data)){
$search_response = curlRequest("get", "https://api.instagram.com/v1/users/self/media/recent/?access_token={$json_data['access_token']}");
$search_response = json_decode($search_response, true);
echo "<pre>";
var_dump($search_response);
echo "</pre>";
我想从JSON输出中获取'likes'“例如:likes:40”
我正在尝试列出像
这样的图片数量(我正在获取我的Instagram帐户照片信息)