I try to implement the share dialog with the Facebook javascript sdk in a PWA. When I open the dialog I get an error that the domain of this URL isn’t included in the app’s domain.
I tried to add all domains and all sub-domains in my Facebook developers console, in the “Facebook login - valid OAuth” but maybe since I try to use the share dialog these domains should be added elsewhere?
Note: My app implement a Facebook login and I could confirm that I don’t face any problems with this flow, the domains are correct for the login and the login works fine.
Code:
FB.ui({
app_id: 'XXXXXXXXXXX',
method: 'share',
href: 'https://something.com'
}, (response: any) => {
console.log(response);
});
P.S.: Same question on Stackoverflow https://stackoverflow.com/questions/50187233/fb-ui-share-dialog-the-domain-of-this-url-isnt-included-in-the-apps-domain