Jump to content

Facebook Share Popup Blocked in pointerdown Event


luschn
 Share

Recommended Posts

Hi,

I am trying to use a FB Share Dialog in my Phaser 3 game, but i assume since the pointerdown does not just get called directly on mouse click, the Dialog gets blocked by the browser:

let someButton= this.add.sprite(200, 500, 'someButton', 0).setInteractive();
buttonLeaderboard.on('pointerdown', () => {
    FB.ui({
        method: 'share',
        href: 'https://mydomain.com'
    });
}, this);

Does anyone have a solution for this, or for popups in general? Opening a new window would also be fine (using sharer.php instead), but that one gets blocked too:

window.open(url, windowName, [windowFeatures])

 

Link to comment
Share on other sites

https://github.com/photonstorm/phaser/issues/3497

I'm literally working on some hacking solution for my project atm.
I'm thinking, instead of pointerdown, use pointerover/out to store some global `action` variable while it's rolled over. And before game boots add `document.addEventListener('click', function(event) { ... });` where you handle the stored action, if any.

Link to comment
Share on other sites

Ok, if there is only a workaround/hack, i would just skip the Share Button for now. Maybe there is another event that fires immediately? Should not be too hard to implement with a separate event, i guess. I subscribed to your issue on Github, :) thanx for the answer and thanx for creating that issue!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...