Ayesh / WordPress-oEmbed-Plus

WordPress plugin to support Facebook and Instagram oEmbed embeds
https://php.watch/articles/wordpress-facebook-instagram-oembed
20 stars 7 forks source link

Multisite support for setting App ID and App Secret #7

Closed paulshryock closed 4 years ago

paulshryock commented 4 years ago

Is there a way to set the App ID and App Secret network-wide on a Multisite installation? There seems to be no Settings > Writing network admin screen. I tried setting up in wp-config.php, but upon testing, it's not working on individual sites on the network.

paulshryock commented 4 years ago

I needed to remove App credentials from wp-config.php and add them to individual sites in Settings > Writing. But for a network with hundreds of sites... it'd be nice to have a network-wide option.

Ayesh commented 4 years ago

Hi @paulshryock - the PHP constant setup in wp-config.php is intended to assist in multisite setups.

Just to eliminate what I think is the likely cause, could you try adding the following to the config file?

define('OEMBED_PLUS_FACEBOOK_APP_ID', '<App ID Here>');
define('OEMBED_PLUS_FACEBOOK_SECRET', '<Secret Here>');

This should provide credentials, and can be confirmed from the Writing options page. It will not show the API keys, but should confirm that settings are entered in the wp-config file.

paulshryock commented 4 years ago

You're right, this worked. I was testing in Firefox with privacy settings that blocked it. Worked in Chrome. This issue can be closed.

Ayesh commented 4 years ago

Firefox ♥️.