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

Using the OAuth Dialog to request permissions for your application

Facebook OAuth Dialog is used to request permissions from the current user for your application. The user can either accept or deny our request. We can use this dialog box to request additional extended permissions from the user after they have already used your application.

Getting ready

  • You should have setup index.php as explained in the beginning of the chapter.

How to do it...

The following steps will demonstrate how to use the OAuth Dialog:

  1. Open index.php and add the following code inside the div with id="launch" as shown:
    <div id="fb-root">
      <input type="button" id="launch" value="Launch" /><br />
    </div>
  2. Add the following code just after the FB.init() function:
    <script type="text/javascript"> ...

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