Symfony2. HWIOauth. Vkontakte. Get profile photo url

202 views Asked by At

I can't get profile photo. Any Ideas?

# Some part from config.yml

hwi_oauth:
    firewall_names: [secured_area]
    resource_owners:
        vkontakte:
            type:                vkontakte
            client_id:           <client_id>
            client_secret:       <client_secret>
            scope:               "photo_50,email"

...

I get all other standard parameters when I log to the site with vk button. Such as: first_name, last_name, email, vk id etc. A field "photo_50" => NULL Response Screenshot Response Screenshot

1

There are 1 answers

0
Stephan Yamilov On

You need this configuration in your app/config/config.yml:

hwi_oauth: resource_owners: vkontakte: type: vkontakte client_id: %id% client_secret: %secret% scope: "email" paths: profilepicture: response.0.photo_big options: fields: "photo_big"