OEmbed and WordPress Embed blocks for Facebook and Instagram will stop working Oct 24, 2020

In August, Facebook announced updates to their Marketing API .

By October 24, 2020, developers must leverage a user, app, or client token when querying Graph API for user profile pictures via UID, FB OEmbeds and IG OEmbeds.

This means, the old embed request will result in an error with a 400-status. In the future, Facebook embeds will require an authentication token, available to users who have a Facebook developer account and created a Facebook app.

Ahead of this change, the Gutenberg team removed the Facebook and Instagram blocks in the 9.0 version, which will come to WordPress core in December’s 5.6 releases. WordPress core will also remove the oEmbed call for the next version(5.6).

Although the blocks are removed in Gutenberg plugin 9.0 version, the auto-oEmbed of pasted links into an empty row will still work until Facebook switches off the open format endpoint.

Frequently Asked Questions

How will that work with legacy embeds? Is the data that is stored in post meta still usable?

As with other broken embeds, instead of the embed, the used link will show.

Does this also apply to Instagram embeds?

Yes. If there was an Instagram link embedding a photo, instead of a photo showing it would be a link to the Instagram post.

Is there a way WordPress could assist?

There’s nothing that WordPress can do about existing embeds, when the provider, here Facebook decides to turn off the oEmbed endpoint. If the oEmbed endpoint for a service ceases to work and the embed HTML isn’t in the post meta cache, then it will stop working.

Is there another way to embed Facebook and Instagram links?

Instagram has a menu item called embed, that will give you the embed code and you can use the Custom HTML block to add it to your page. Various Facebook posts format have a similar feature.

How to get the necessary Facebook developer & app credentials?

PHP.Watch has detailed instructions on how to go through the process. Site owners and their consultants only have to go through this once.

Using native embed code

Both Facebook and Instagram offer in their menus embed functionality and provide iframe code for embedding in 3rd party sites. As far as we know, those will still be available.

This video shows how to use the feature to embed an Instagram photo.

Plugin to Migrate Embeds to new API calls

Ayesh Karunaratne created the oEmbed Plus plugin to ease the pain for publishers and bloggers, who might have used hundreds of Facebook embed views in their news.

This plugin implements the new Facebook APIs to bring back support for Facebook and Instagram content embedding. Each site owner would need to register as developer and get app credentials to add them to the plugin’s settings page.

Screenshot: Oembed Plus plugin

Sarah Gooding also wrote about this on the WPTavern with more background on what oEmbed is and how it came about.

How are you handling this breaking change from Facebook?
Leave your ideas and questions in the comments.


Receive your Block Editor & Gutenberg Fix every Saturday at noon EDT.