OGP Basics
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.
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.
Main purpose of Open Graph protocol
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.
With the help of OGP, Facebook downloads titles (og:title), descriptions (og:description), URL address (og:rl), images (og:image) and image dimensions (og:image:width, og:image:height), languages (og:locale), object types (og:type), website’s names (og:site_name), Facebook profile’s administrator’s numbers (og:admin), and the number of Facebook application created by the administrator (fb:app_id) of the website, webpage, blog or blog article that is to be downloaded during that sharing process (URL share) or liking of the page (Page like).
How to integrate OGP into a webpage
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" />
Facebook website snippets
Here is an example of how a page shared via Facebook looks like:'); ?>
Connecting the website with Facebook profile via #OpenGraph Protocol
Posted by PopArt STUDIO on Friday, September 11, 2015
Here is an example of how Open Graph Protocol looks like in the code of the page you are currently looking at:
<head lang="en" prefix="og: http://ogp.me/ns#">
<meta property="og:title" content="What Is Open Graph Protocol (OGP)?" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.popwebdesign.net/what-is-ogp.html" />
<meta property="og:image" content="https://www.popwebdesign.net/img/open-graph-protocol.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:site_name" content="PopArt Studio" />
<meta property="fb:admins" content="100000505383935" />
<meta property="og:description" content="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." />
Read more:
- How to make Facebook application for a website?
- What is SMM?
- What is Twitter Cards?
- Online Open Graph Protocol generator tool
External links and sources:
- The official OGP page where you can find detailed instruction for the Open Graph Protocol