Symfony2 — HWIOAuthBundle Как получить информацию, которую я установил на пути

Я реализую этот Пакет в моем проекте, но он предоставляет информационные поля ник, имя пользователя, реальное имя, адрес электронной почты …

Мне также нужно поле Имя, Фамилия и День рождения

Как добавить или переопределить эти методы?

My Settings: config.yml


hwi_oauth:
firewall_name: secure_area
connect:
confirmation: false

resource_owners:
facebook:
type:                facebook
client_id:           454595989899812
client_secret:       eba0d566631eec3e012545a5f28443dd4
infos_url: "https://graph.facebook.com/me?fields=id,email,first_name,last_name,gender,birthday,locale,location,picture.type(square)"scope:  "public_profile,user_birthday,email"paths:
email: email
firstname: first_name
lastname: last_name
gender: gender
birthday: birthday
profilepicture: picture.data.url
locale: locale
google:
type:                google
client_id:           <client_id>
client_secret:       <client_secret>
#scope:               "user:email"fosub:
# try 30 times to check if a username is available (foo, foo1, foo2 etc)
username_iterations: 30

# mapping between resource owners (see below) and properties
properties:
facebook: facebook_id
google: google_id

Как я могу получить значения, которые я установил пути?

Спасибо!

1

Решение

$data = $response->getResponse();
...
$data["email"];
$data["picture"]["data"]["url"];
$data['first_name'];
$data['last_name'];
$data['locale'];

С путями:

$response->getEmail();
$response->getProfilepicture();
$response->getFirstname();
$repsonse->getLastname();
$repsonse->getLocale();
1

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector