Recently we notice an not described change in Facebook shares API that may prevent the sharing of work. The change itself may be results of the upcoming GDPR regulations. But am I having that problem on my site? The answer is that you need to test the work of Facebook share command and if you see the following message appearing than you have such problem.

Can’t Load URL: The domain of this URL isn’t included in the app’s domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

The function that causes the problem is the closing window command after share. With that change of the Facebook API the close will no longer be an option that users will be able to use anymore – maybe this results in strongest user regulations.

What is the solution?

You need to update Easy Social Share Buttons for WordPress to version 5.5.2 or newer. The version is available with automatic plugin updates for all users that have registered the product or you can update the plugin manually from your Envato profile.

The change that affects work of button can be also made on any of existing Easy Social Share Buttons for WordPress versions. Below you can find a step by step tutorial of that – required level novice. All changes are made in one file: easy-social-share-buttons3/lib/core/essb-button-helper.php.

1. Locate the following line of code:

$url = sprintf ( '$s&t=%2$s&redirect_uri=%3$s', $share ['url'], $share ['title'], $close_callback );

and change it to

$url = sprintf ( '$s&t=%2$s', $share ['url'], $share ['title'], $close_callback );

2. Locate at the same file the following line (just a little below the above)

$url = ''.$fbappid.'&display=popup&name='.$share['title'].'&link='.$share['url'].'&redirect_uri=';

and make it

$url = ''.$fbappid.'&display=popup&name='.$share['title'].'&link='.$share['url'].'';

The change inside Facebook, for now, is not affecting users that has Advanced Sharing active on site but we advise all users to take immediate actions and do an update.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Reply