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

Firefox private mode issues #33

Open
gordonbisnor opened this issue Mar 7, 2018 · 2 comments
Open

Firefox private mode issues #33

gordonbisnor opened this issue Mar 7, 2018 · 2 comments

Comments

@gordonbisnor
Copy link

I had originally set up facebook init in our application route as per the README:

beforeModel() {
  return this.get('fb').FBInit();
}

But my client noticed that our site now does no work in Firefox private mode, which I realized was a result of adding this library. Firefox is blocking the Facebok init.. So I have changed our code to this:

  beforeModel() {
    this.get('fb').FBInit().then(ok=>ok).catch(()=>true);
  }

This at least lets the bulk of our site load, but we have a remaining issue of Facebook sharing buttons that do not work in Firefox private mode.

I'm posting this issue as a general heads up, and wondering if this library has a way to check on the status of FBInit, or if anyone has any advice on how to work around this –– eg so that I can not show facebook share buttons if they are not going to work when clicked...

@gordonbisnor
Copy link
Author

Hm I can't find anything within the library to easily check status of fb init. Seems like it would be ideal to have a property on the service that would indicate status. I could try to work on a PR if you like if something does not already exist that handles this scenario, let me know!

@bugant
Copy link
Member

bugant commented Jan 31, 2019

@gordonbisnor sorry I miss the notification for your issue. Are you still interested?

One workaround could be to check for , window.fbAsyncInit.hasRun see: https://github.com/pitchtarget/ember-cli-facebook-js-sdk/blob/master/addon/services/fb.js#L49

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