Symfony 2 - Facebook Bundle - FacebookProvider - How to use the service and Entity Manager in FacebookProvider?

Everything in the title, I use FacebookBundle:

http://knpbundles.com/FriendsOfSymfony/FOSFacebookBundle

Facebook login is working correctly and I want to use some services and initiate some objects of my project to update my user data.

// in my Facebookprovider

$ user-> setFBData ($ fbdata);

So, before this line, I want to use a specific service and use the entity manager to populate the $ fbdata array with the correct data, how should I do it?

Is that the right way?

Thank you for your responses.

+3
source share

All Articles