Facebook’s Open Graph Protocol allows developers to control how the content of their site is shared when a user “likes” or otherwise shares a link to their site on Facebook. When a visitor to your page shares a link or likes a page, Facebook recognizes this link and displays an image, hyperlink, and content from the link. This content can be controlled by using Facebook’s Open Graph.
Inside the <head> tag of your site, you can include meta tags that define the Type, Title, Image, and URL that you would like users to share.
The Open Graph protocol defines four required properties:
- og:title – The title of your object as it should appear within the graph
- og:type – The type of your object
- og:image – An image URL which should represent your object within the graph. The image must be at least 50px by 50px and have a maximum aspect ratio of 3:1. PNG, JPEG and GIF formats are supported. You may include multiple og:image tags to associate multiple images with your page.
- og:url – The canonical URL of your object that will be used as its permanent ID in the graph
For more information on implementing Open Graph for your site visit Facebook’s Developer documentation page.