Setting Up Your Web Site to Use Graph API
Now that you have a sense of the basics about how Graph API works, it's time to set up your Web site to start making calls to Graph API.
First, just like I do with the application setup in Chapter 2, you need to set up your Web site so that Facebook knows who you are, and it can authorize your requests. Web sites get set up just like applications, and in fact, sites can be a great extension to an existing application, as you soon see. Facebook needs you to register, though, to keep out fraudulent use of its API.
Setting up your Web site on Facebook
To set up your Web site, go to your Inspirations application that you set up in Chapter 2. Here are the additional steps you need to take to get your Web site up and running:
- Go to facebook.com/developers.
Next to your Inspirations application, click the More link and select Edit Settings from the drop-down box that appears. (See Figure 7-2.)
- Click the Web Site tab from the choices on the left.
You're taken to a page that looks like the one shown in Figure 7-3. Here you can enter information pertaining to your Web site, which gives requests from your Web site's URL permission to access the Facebook API.
- Enter your site's URL.
In the Site URL field, enter the main URL for your site (prefixed by http://). This will be used to point users back to your site on various parts of Facebook.
Get Facebook® Application Development For Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.