【发布时间】:2015-04-07 07:41:06
【问题描述】:
我正在尝试从 instagram 获取我的关注者和关注者的列表,(对于一个 php 网站)
我使用了这个代码
$followedby = file_get_contents("https://api.instagram.com/v1/users/$userid/followed-by?access_token=$accessToken");
echo $followedby;
这是我得到的输出样本
{"pagination":{},"meta":{"code":200},"data":
[
{
"username":"abc",
"profile_picture":"https:\/\/instagramimages-a.akamaihd.net\/profiles\/profile_pic.jpg",
"id":"36938409",
"full_name":"abc"
},
{
"username":"cdf",
"profile_picture":"https:\/\/igcdn-photos-e-a.akamaihd.net\/hphotos-ak-xfa1\/t51.2885-19\/pic.jpg",
"id":"1174996540",
"full_name":"cdf"
}
]
}
谁能告诉我如何从这个结果中获取用户名、img、全名
【问题讨论】:
标签: php api phpmyadmin instagram-api