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

 Share

  • Recently Browsing   0 members

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