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

Added check if FB SDK has already loaded on page, otherwise fbAsyncInit ... #94

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dreamoftrees
Copy link

Hi,
Thanks for all your work on this I've found it really helpful. I noticed in some instances possibly when the SDK is cached locally that $window.fbAsyncInit is called before it's declared below. Meaning the FB SDK will never trigger the initialisation of this class.

I've just added a small check to see if the FB SDK already exists then just init directly. Hope that makes sense. Sorry this is my first pull request, let me know if I can help in any other way.

Thanks again,
Charlie

@mrzmyr
Copy link
Collaborator

mrzmyr commented Aug 18, 2015

Hi @dreamoftrees, can you provide a little example how to reproduce this ?

@wrwang
Copy link

wrwang commented Jan 19, 2016

This pull request actually fixed the bug I experienced only in Firefox. When opening my website via new tab, the SDK was cached. When switching to the controller, the Facebook plugin would never report ready status. Firefox appears to use the cached version and does not initiate the $window.fbAsyncInit call. Using Firefox 43.0.4. This does not occur in Chrome.

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

Successfully merging this pull request may close these issues.

3 participants