1

I try to create a registration on my page with facebook. According to that, I would like to get following information from the user: - email - name - surname - profile image - location

I have following request:

public function get_user_info(OAuth2_Token_Access $token)
    {
        $url = 'https://graph.facebook.com/me?'.http_build_query(array(
            'access_token' => $token->access_token,
        ));
        $user = json_decode(file_get_contents($url));
    }

The problem is, that I only get the [name] and the [id] back. What I am doing wrong?

Thanks for helping me.

Greets, yab86

yab86
  • 395
  • 6
  • 24

0 Answers0