O'Reilly logo

Facebook Application Development with Graph API Cookbook by Apeksha Singh, Shashwat Srivastava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating web pages into the social graph

The Facebook Open Graph protocol allows us to specify how to represent our web page on its network when a user likes our page. This is done with help of the <meta> tags present in our web page. We can configure them to make our web page appear in relevant Likes and Interests sections of a Facebook users' profile so that they are able to relate to our web page in a better manner. Here, we will show you how to do this:

How to do it...

The following steps will demonstrate how to integrate web pages:

  1. Open your web page, say content.php, and add the following code to it:
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <title>Packt Publishing</title> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required