In this tutorial, we are gonna see, how to add Facebook open graph meta tags into WordPress using Yoast’s WordPress SEO plugin. I believe most of the WordPress users are using this free plugin to optimize their content, in order to make their site SEO friendly. Let’s see how to get it done. First make sure the plugin is installed and activated on your blog, if you are not using this plugin then get it from here.
You would find a screen like the below one.
Check the box “Add Open graph meta data” to setup OG for your WordPress theme.
If you want to see the Facebook insights of your site to see how well it is doing on Facebook then you need to add Facebook Admin id or App id.
Add Image URL and Description for the home page. The image URL and description you give here, would be used when someone likes or shares you home page link on Facebook.
Specify a Default image URL at last – This image would be used for the posts/pages, which don’t have any images in them.
Click Save Settings and you are done!!
One more thing you can do using this plugin – It basically fetches few first line for open graph description but if you want to give a different unique description for your content then give it in the social tab, You can find it below the post editor in WordPress dashboard itself.
Do let us know which plugin are you using for adding Facebook open graph into site’s theme.