Open graph tags for Facebook

Here are the common open graph tags to be supplied by a page. You need to put these tags in your <head></head> section.

<meta property="fb:admins" content="xxxxxxxxxx" />
<meta property="fb:app_id" content="xxxxxxxxxxxxxx" />
<meta property="og:url" content="http://your_url" />
<meta property="og:site_name" content="Site Name" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Title" />
<meta property="og:description" content="Short Description" />
<meta property="og:image" content="http://image_url" />
<meta name="author" content="Name" />

fb:admins defines who manage this page and moderate the plugins used on this page. The content is your facebook user id. To get your user id, visit the graph API explorer and make a call on /me. You should get a JSON response like the following.

{
  "id": "xxxxxxxxxx",
  "name": "ASDF JKL;"
}

You can add multiple admins by separating them using a comma.

fb:app_id indicates that this page belongs to a facebook app. The id can be found in your facebook developer dashboard. Usually, you only need to define either fb:admins or fb:app_id but not both.

og:url is your page's URL. Note that if your page supports both www and non-www, or https and http, this property should be consistent on all the different URL. For example, https://calvin.my/ will be used regardless of www or non-www, https or http.

The other properties are quite straight forward, but make sure they are defined because it affects how your page appears on Facebook. For example:

To test if facebook has no problem reading your tags, please refer to the Sharing Debugger tool.


AI Summary
Chrome On-device AI 2024-07-20 05:59:59

Share Article