Open qdelettre opened 11 years ago
You make your own FB Connect button using the facebook_login_url helper. Here an example from my website : Edit : It's not an helper actually but a URL get from the FB API. See next post.
<div class="co_co_button" id="fb_button">
{{ facebook_initialize({'xfbml': true, 'fbAsyncInit': 'onFbInit();'}) }}
<a href="{{facebook_login_url}}" title="{{ 'security.login.social_connect.connect_facebook' | trans({}, 'EPUserBundle')}}">
<img src="/images/pictos/connect-fb.png" alt="{{ 'security.login.social_connect.connect_facebook' | trans({}, 'EPUserBundle')}}" />
<div class="co_co_button_label">
<span>{{ 'security.login.social_connect.connect_facebook' | trans({}, 'EPUserBundle')}}</span>
</div>
</a>
</div>
facebook_login_url helper ? facebook_login_url is not defined for me.
My bad, I thought it was an helper but it actually an URL I retrieved from the API. I should have read the code completly. :) Edit : But you can come with your own helper of course.
You can get the url from
$facebookLoginUrl = $this->container->get('fos_facebook.api')->getLoginUrl(array('redirect_uri'=> $this->container->get('router')->generate('fos_fb_security_check', array(), true) ));
I implemented this in my page but it is not return email of user. so how can i get email of user ?
I would like to change the button image to another.
How can i do that ?