Hi everybody, I have a big problem to get the list of the friends who use the same app... I'm making a game (in canvas) and now, it's the time to integrate with facebook... I use this part of the script: $accessToken = $session->getAccessToken(); $longLivedAccessToken = $accessToken->extend(); $session = new \Facebook\FacebookSession($accessToken); // Check user's token is valid or not. $me = (new \Facebook\FacebookRequest( $session, 'GET', '/me/friends'))->execute()->getGraphObject(\Facebook\GraphUser::className()); $result = $me->asArray(); // Get user's friends $friends = $result['data']; // Converting classes to array foreach ($friends as $key => $value) { echo $friends[$key] = (array)$value; echo "|"; } PHP: the page will echo: Array|Array I don't understand why, the script repeat the Array two times because the user has 2 friends who use the same app...but I would like to retrieve the two UID of the friends... I don't know why doesn't works... thank you very much!!
Use Social. It is much easier and handles the conversion for you by only spitting out the result arrays. Plus it has and will have support for many other social media API's. Check it out here https://github.com/Karl-EdwardFPJeanMehu/Social