WordPress oEmbed Plus: Facebook and Instagram content embed
WordPress supports embedding external content such as Facebook videos, Instagram photos, YouTube videos, etc from the URL.
The URL input is turned into an embeded Facebook video:
WordPress uses oEmbed
Internally, WordPress block editor uses oEmbed protocol and a legacy Facebook API to fetch post/photo/video/etc content and embed the HTML in the post.
Facebook deprecates legacy oEmbed API on 2020 October 24
The legacy API WordPress used to fetch embed contents did not require any credentials such as an access token to function, which made it possible to embed Facebook and Instagram content without any additional configuration.
Facebook is to deprecate the legacy oEmbed API on 2020 October 24.
Due to this change, WordPress 5.5.1 plans to remove Facebook and Instagram content embed support and hand over this functionality to a third party plugin.
Facebook and Instagram embeds with a plugin
Once installed, this plugin needs to know a Facebook App access token to function. You can set the API key and secret in Admin Dashboard → Settings → Writing.
Register a Facebook app
With a Facebook acccount and logged into it, head to Facebook Developer Apps list to create a new app. Click "Add a New App", and select "For Everything Else" for the use of it.
You will need to enter a name for the app and an email. The app name can be any name. Name and email will not be shown in the WordPress front end at all.
Add oEmbed to the app
Once the app is created, you need to enable oEmbed feature for the app.
From the "Products" list, add oEmbed by clicking "Set Up".
Enter additional App details
In order to complete and retrieve API keys, the app needs to be live and complete.
Switch App to Live mode
Using the toggle on the top of the page that says "In Development", you can now switch the app to live mode.
You will be asked to enter additional details if anything is missing.
Get App ID and Secret and enter in plugin settings
To retrieve the App ID and Secret key, go to Settings → Basic in the Facebook app. You will see the App ID and Secret, which you can enter in the WordPress oEmbed Plus settings.
That's it. Your existing embedded content will continue to work (as they are stored as rendered HTML content). New Facebook and Instagram content will use the new authenticated API.
Facebook allows up to 5 million requests a day. Once the content is embeded, the output is cached in the database, and it does not trigger any further requests.
Please check out the Git repository Ayesh/WordPress-oEmbed-Plus. PRs and issues are welcome!