get send like this:
$request_params = array('access_token' => $access_token); $get_params = http_build_query($request_params); $result = json_decode(file_get_contents('https://api.instagram.com/v1/users/self/followed-by?'.$get_params)); the answer comes like this:
{ "data": [{ "username": "kevin", "profile_picture": "http://images.ak.instagram.com/profiles/profile_3_75sq_1325536697.jpg", "full_name": "Kevin Systrom", "id": "3" }, { "username": "instagram", "profile_picture": "http://images.ak.instagram.com/profiles/profile_25025320_75sq_1340929272.jpg", "full_name": "Instagram", "id": "25025320" }] } I can not parse through foreach, because I write that the object does not exist. I tried this:
foreach ($result as $key) { echo $key->data->username; }
foreach ($result->data as $key) {. - user207618