Categories

Open Graph

Sandra Kim March 14, 2016
No votes yet.
Please wait...

The Open Graph is a protocol which enables any web page to become a rich object in a social network. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook. Through Open Graph protocol you can define how your shared contents should be displayed on Facebook.

Most content is shared to Facebook as a URL, so it is important that you mark up your website with Open Graph tags to take control over how your content appears on Facebook. To turn your web pages into Open Graph objects, you need to add basic metadata to your page. In particular, you need to place additional <meta> tags in the <head> of your web page. These tags include descriptive meta-data about the content that you specifically want to present when someone shares your blog post or page. The four required properties for every page are:

  • og:titlethe title of your object as it should appear within the graph.
  • og:typethe type of your object, for example, “article”. Depending on the type you specify, other properties may also be required. This tag impacts how your content shows up in Facebook News Feed.
  • og:imagean image URL which should represent your object within the graph.
  • og:urlthe canonical URL of your object that will be used as its permanent ID in the graph, for instance “http://www.example.com/2016/02/10/articles/article.html”.

The following properties are optional for any object and are generally recommended:

  • og:descriptiona brief description of the content, usually between 2 and 4 sentences. This will be displayed below the title of the post on Facebook.
  • og:audioa URL to an audio file to accompany this object.
  • og:videoa URL to a video file that complements this object.
  • og:localethe locale of the resource. Default is en_US.
  • og:site_namethe name of your website (such as IMDb, not imdb.com).

As an example, the following is the Open Graph protocol markup for an article, news story or blog post with og:type="article":

	<meta property="og:url" content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" />
	<meta property="og:type" content="article" />
	<meta property="og:title" content="When Great Minds Don’t Think Alike" />
	<meta property="og:description" content="How much does culture influence creative thinking?" />
	<meta property="og:image" content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />

Here is an example of content formatted with Open Graph tags for optimal display on Facebook:

open_graph_1
Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

Comments are closed.