본문 바로가기

webdesign/design

What Is Open Graph Protocol (OGP)?

www.popwebdesign.net/what-is-ogp.html

 

What Is Open Graph Protocol (OGP)?

Open Graph Protocol (OGP) is a set of instructions intended for highlighting the title, description, URL and the image of a website you are sharing via Facebook.

www.popwebdesign.net

OGP was created in 2010 by Facebook engineers and has been used since solely and exclusively to control the connection of content and its sharing on this social network.

The main purpose of OGP is to integrate the highlighted content and show it on Facebook, as well as to control its appearance, that is, how the highlighted content will be shown.

 

You can integrate OGP into a webpage by adding meta element into its <head>. In order to integrate OGP, you need to insert the prefix and define attribute by following this simple 9-step tutorial:

 

First, you must highlight and add prefix into meta element’s <head> and highlight that OGP is present in page code:

<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">



Then, you need to add website or webpage title:

<meta property="og:title" content="Website title" />



Add the description of the website (optimally, up to 156 characters including spaces)

<meta property="og:description" content="Website description" />



Insert the tag with URL address of the page:

<meta property="og:url" content="Website URL address" />



We need to highlight and determine URL of the image which is to be used while sharing and liking the Facebook page:

<meta property="og:image" content="Website image URL" />



Write dimensions of the image from the fifth step:

<meta property="og:image:width" content="Website image width" />

<meta property="og:image:height" content="Website image height" />



Write the name of the website, blog, natural person, or company:

<meta property="og:site_name" content="Website name" />



Add and determine object type by choosing the tag which best describes whether it is a website, personal portfolio, author, book, restaurant, blog or blog article, etc:

<meta property="og:type" content="Website type" />

 

Currently available objects are the following: (website, article, book, books.author, books.genre, business.business, fitness.course, music.album, music.musician, music.playlist, music.radio_station, music.song, object, place, product, product.group, product.item, profile, quick_election.election, restaurant, restaurant.menu, restaurant.menu_item, restaurant.menu_section, video.episode, video.movie, video.tv_show, video.other).

*There may be some changes in the existing or adding new object attributes due to constant development of the Open Graph Protocol.




The last, but not the least, is adding the ID of a private Facebook profile’s administrator number from which the Facebook page of the company was created:

<meta property="fb:admins" content="Facebook admin Id number" />

 

or adding the ID number of the Facebook application which was created from the administrator’s Facebook account:

<meta property="fb:app_id" content="Facebook application Id number" />