WordPress  Facebook oEmbed problem
29.11.2021 16:31 1.098 Displayed

WordPress Facebook oEmbed problem

WordPress  Facebook oEmbed problem  | Atak Domain Hosting

As of 24 October, Facebook has removed support for incorrect WordPress themes. This way, if you include Facebook and Instagram content on your WordPress site, it will crash.

In addition, the old Facebook oEmbed endpoint is being replaced by a new endpoint that needs to be edited with Facebook. Since Facebook owns Instagram, the same requirements apply to the Instagram oEmbed endpoint.

In this article, we will explain how WordPress uses Facebook and Instagram oEmbed's endpoints, what has been updated, and how you can fix issues to make your plugin work.

Let's get ready!

contents

1. How WordPress uses oEmbed to place content

2. Facebook and Instagram oEmbed Endpoints (Legacy)

3. Recent "oEmbed" signs of new Facebook and Instagram

4. What will happen to Kevin Facebook and Instagram Embed?

5. How to add content to Facebook and Instagram (after October 24)

6. How to fix Facebook and Instagram issues oEmbed in WordPress

How WordPress uses oEmbed to place content

oEmbed is a protocol that allows websites to use only one URL to store content from other third-party websites. It was originally designed to avoid the need to copy and paste HTML from other websites. WordPress uses oEmbed to display additional content (such as images or videos).

All you need to do is put the source URL in the content field, and WordPress will automatically convert the tool and display a real-time preview of it.

Only include URL content in WordPress

In the example above, I drew a link to a YouTube video, and WordPress automatically converted it to video media. The oEmbed protocol is the backbone of WordPress, and it contains various content from various social media platforms, such as videos, images, updates, etc.

Although WordPress allows you to store cleared ads from any registered oEmbed server, for security reasons, it does not process all these ads privately. It only contains the URLs of some approved oEmbed servers.

OEmbed's trusted WordPress server products include the most popular hosted content and social networking sites, such as Imgur, Facebook, Instagram, Tumblr, YouTube, Vimeo, etc. These providers can also hold any content, such as videos, iframes, JavaScript, and random HTML text.

Facebook and Instagram oEmbed endpoints (old version)

Facebook and Instagram recent points oEmbed is the basis for embedding Facebook and Instagram content in WordPress sites.

 Example of how WordPress retrieves Facebook content

The Facebook oEmbed endpoint allows WordPress to capture not only the main content, but also metadata such as page name and logo, date and time, thumbnails, number of likes, comments and shares, and source URL.

Example of how WordPress responds to Instagram content

The same goes for downloading content from Instagram. You can not only see the embedded image, but also the important metadata information related to it.

The newest point on Facebook and Instagram is "oEmbed".

Facebook announced that it will cancel the current oEmbed final points from October 24, 2020. They refer to these old endpoints as Legacy oEmbed endpoints.

Before October 24, 2020, developers need to use user, application or customer logos when requesting user profile images through UID, FB OEmbeds, and IG OEmbeds. When using UID or ASID to request a profile picture, the developer must find the user or application tag, but client-side tagging is also supported. Please visit our website to learn more about how to immediately start calling these Graph API endpoints for our user images, Facebook OEmbed, and Instagram OEmbed.

-Facebook for developers

What you need now is to utilize the Facebook oEmbed API

In view of the nature of oEmbed's open Web API, the new Facebook oEmbed API has different requirements:

• You must be a Facebook developer.

• Next, you need to be a registered Facebook application owner to create a unique application ID.

• Next, you need to activate the oEmbed product for your registered Appa.

• Next, you need to create an access application token or customer access token.

• Finally, you need to install the Facebook App for Live mode.

In response to these new demands, WordPress no longer uses Facebook and Instagram as trusted sources oEmbed.

We hope to see another major update to WordPress through these changes. If you are using Gutenberg plugins, the latest version of Gutenberg 9.0 has removed support for them.

What will happen to Kevin Facebook and Instagram Embed?

WordPress hides the oEmbed response in its database under the meta-post or hidden mail type oembed_cache (currently only for widgets).

Because WordPress does not clear these values ​​by default, the plugin content will continue to exist on your site.

But if you manually delete them from the database, they will be cleared. Therefore, any Facebook or Instagram plugins you added before October 24th will continue to be used after the cancellation date.

How to add Facebook and Instagram content (after October 24)

If you try to leave Facebook or Instagram content after inheriting the latest oEmbed points, you and your users may receive HTTP 400 errors in response.

To help us test what the implementation will look like after October 24, 2020, Facebook added a parameter to the oEmbed old endpoint to simulate errors. I tested it and the results are as follows.

Simulated transmission using Facebook oEmbed endpoint

Facebook backlinks will be displayed as small blocks (up to 120 characters). It also contains links to the author and original source, but nothing more.

Want to know how we increased traffic by 1000%?

Receive my weekly newsletter with over 20,000 people, which includes a built-in WordPress plugin!

Subscribe now

There is no mention of Facebook other than the link and click that takes you to Facebook.

Analog transmission using Instagram oEmbed old endpoint

In contrast, Instagram backlinks with embedded structures are much better.

However, this is a temporary problem. Once WordPress removes the Facebook and Instagram endpoints from oEmbed, the old oEmbed endpoints will no longer be a problem.

The only way to accommodate Facebook and Instagram content is to meet Facebook's requirements. You will learn how to do this in the next section.

How to fix Facebook oEmbed Facebook and Instagram issues in WordPress

The easiest way to edit Facebook and Instagram plugins in WordPress is to use the free oEmbed Plus plugin provided by Ayesh Karunaratne. It can help you set up a new Facebook oEmbed endpoint to reactivate Facebook and Instagram locations in the block editor.

WordPress  Facebook oEmbed problem  | Atak Domain Hosting

OEmbed Plus WordPress plugin

To start using it, first install and activate the plugin.

Note: oEmbed Plus requires PHP 7.3 or higher to work. If your current WordPress host does not support PHP 7.3+, we strongly recommend that you find a new host.

Tired of WordPress issues and slow hosting? We provide global support from WordPress experts who provide 24/7 and fast mobile servers. View our plan

Next, if you don’t have one yet, create a Facebook account for the developer. Next, create an Appek. In my case, I named my application "WordPress Site", but you can name it whatever you want.

WordPress  Facebook oEmbed problem  | Atak Domain Hosting

Create an app for the developer portal on Facebook

Creating an application will automatically create an App ID for it.

You can find your application ID and application hiding by going to "Settings Bing Main Panel" at the bottom of the "Applications" panel. Take a look at these two values, because you will need them later.

WordPress  Facebook oEmbed problem  | Atak Domain Hosting

Facebook'App ID' and'App Secret' for app developers

When you are here, enter the privacy policy URL and it needs to go to the Live App. It is recommended that you use the correct privacy policy to ensure that your application is not blacklisted.

oEmbed products are automatically activated by the client, so you can keep it as it is.

Next, go to the settings and writing screen in the WordPress dashboard, and then browse to the embed settings section of Facebook and Instagram. Here, enter the App Identification and App Secret values you have specified.

WordPress  Facebook oEmbed problem  | Atak Domain Hosting

Configure oEmbed Plus plugin settings

Alternatively, you can add the application ID and application hiding to the wp-config.php file. This is the code snippet you need to use:

Definition ('OEMBED_PLUS_FACEBOOK_APP_ID', '7168...app.id...789');

Definition ('OEMBED_PLUS_FACEBOOK_SECRET', '20e5...app.secret...890xyz');

Don't forget to replace the values ​​listed above with your own values! When finished, save the file.

If you modify the wp-config.php file to configure oEmbed Plus, it will automatically disable the App Identity and App Secret fields in the WordPress dashboard. Therefore, you can keep your application credentials secret from other users.

This is too much!

All new Facebook and Instagram conversions now use the new authentication API to place content on your WordPress site.

Other featured social media applications, such as Instagram Feed and Social Post Feed, have also added support for the new endpoint of Facebook oEmbed.

However, these plugins have many features, so they may be too small for the specific use case of your website. However, if you are already using them, you can view them.

So far, Facebook has been generous with the rate limit of its new API. They allow you to make 5 million requests per day. When WordPress hides the oEmbed API response in the database, the embedding will not perform more requests than the first one. You can refer to the new Facebook oEmbed documentation for more information.

compilation

WordPress is the most popular CMS today. Similarly, Facebook and Instagram are the most popular social media platforms. Therefore, this change may affect millions of websites.

Streaming social media content in WordPress can provide a unique experience for your website visitors. From October 24, 2020, many unsuspecting users will find the mixing of Facebook and Instagram content annoying. We hope this article helped you solve the Facebook oEmbed problem in WordPress.

If you still have questions about the Facebook and Instagram apps, please let us know in the comments!

_______________________________________

Save time, money, and improve website performance by:

• Instant help from WordPress hosting experts, 24/7.

• Cloudflare Enterprise integration.

• A global audience reaches data centers around the world.

• Use our built-in application performance monitor for optimization.

Buy WordPress Hosting at Best Prices!