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 audio and video data

Many a time, our web page contains audio and video data, which we will want to share on Facebook when a user likes our page. We can do so with the help of the Facebook Open Graph protocol. It has a specific set of metadata for this purpose. In this recipe, we will show you how to integrate audio/video data of your web page into the social graph.

Getting ready

Read the Integrating web pages into the social graph recipe.

How to do it...

T he following steps will demonstrate how to integrate audio and video:

  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>
  2. Add the metadata for ...

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