risposta

11

Nel complesso è abbastanza facile e richiede solo alcuni aggiustamenti in config.yml:

hwi_oauth: 
    firewall_name:   secured_area 
    resource_owners: 
     facebook: 
      type:   facebook 
      client_id:  <client_id> 
      client_secret: <client_secret> 
      infos_url:  "https://graph.facebook.com/me?fields=username,name,picture.type(square)" 
      paths: 
       profilepicture: picture.data.url 

Maggiori dettagli possono essere trovati in documentation.

+0

e come accedere ai dati (immagine) nel codice? (per esempio nel controller) – pleerock

+0

ok, ho capito. Devo fare qualcosa di simile: '$ this-> getResourceOwnerByName ('facebook') -> getUserInformation ($ this-> get ('security.context') -> ControllaToken() -> getRawToken()) -> getResponse () ' – pleerock

+0

@pleerock Si utilizza il nome del percorso: $ response-> getProfilePicture(); – Jonathan

Problemi correlati