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

Publishing actions of a user to Facebook

Facebook Open Graph Beta gives us the capability to publish actions to Facebook whenever a user interacts with our Facebook Open Graph objects. Here, we will show you how to publish actions.

Getting ready

You should have configured your application to be used with Facebook Open Graph Beta, that is, you should have set up objects, actions, and aggregation. If you haven't already done so, refer to the all the recipes discussed earlier in this chapter.

How to do it...

The following steps will demonstrate how to publish user actions:

  1. Open index.php and add the following code to it:
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"lang="en-US" xmlns:fb="https://www.facebook.com/2008/fbml">
  2. Add the following meta ...

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