答えて

11

は全体的に、それは非常に簡単だと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 

詳細はdocumentationで見つけることができます。

+0

コード内のデータ(画像)にアクセスするにはどうすればよいですか? (コントローラなどの) – pleerock

+0

大丈夫、私はそれを得た。私はこのようなものを作る必要があります: '$ this-> getResourceOwnerByName( 'facebook') - > getUserInformation($ this-> get( 'security.context') - > getToken() - > getRawToken())> getResponse ) ' – pleerock

+0

@pleerockパス名は$ response-> getProfilePicture()です。 – Jonathan

関連する問題