Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't render FB login button after navigating to different page and back #78

Closed
deejbee opened this issue Jul 10, 2017 · 3 comments
Closed

Comments

@deejbee
Copy link

deejbee commented Jul 10, 2017

If I place xfbml code in a directive to render the login button then navigate to another page and return to the login button page, it doesn't render the button.

Do I need to call FB.init() on every time the directive is shown again?

EDIT: well even calling FB.init() every time the directive is shown still doesn't show the FB login button. I don't know what's wrong.

@pc035860
Copy link
Owner

Don't use xfbml code, just use the HTML5 one, and easyfb will handle the rendering for you.
See https://github.com/pc035860/angular-easyfb#social-plugins-support.
Social plugin + router demo: http://plnkr.co/edit/1c5cWB?p=preview

@deejbee
Copy link
Author

deejbee commented Jul 10, 2017

Hi, it seems to work on the social plugins (Like button etc.) but NOT the login button:

This works and re-renders the Like button when navigating the site
<div onrender="rendered()" class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

This doesn't re-render, only the first time:

<div onrender="rendered()" class="fb-login-button" data-max-rows="1" data-size="large" data-button-type="login_with" data-show-faces="false" data-auto-logout-link="false" data-use-continue-as="false" data-scope="public_profile,email,user_friends"></div>

@pc035860
Copy link
Owner

Hi, I found that fb-login-button is currently not supported by easyfb. I'll try to add the support asap.
Thank you for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants