Online Book Reader

Home Category

Facebook Cookbook - Jay Goldman [31]

By Root 652 0


This section will be available to you only if your app is set in the Base Options as being able to be added to Facebook (see the earlier section for details).

Who can add your app?

Of all the dastardly user interface designs you’re likely to encounter as a Facebook developer, this question has got to rank near the top. It’s such a strange mix of controls that it deserves its own screenshot for posterity (Figure 3-5).

Where to even start? Perhaps with the lonely checkbox labeled Users. The difficult-to-understand distinction here is that you’re enabling Users and/or Pages, which would be much more obvious if there were a checkbox for Pages with the three Page-related options grouped underneath it. And speaking of those three blind mice: the All and None choices are pretty self-explanatory, but what to make of Some? Clicking on it will open a massive list of checkboxes that let you tailor the types of Pages (e.g., some combination of the 69 available Page types, which includes Actor and Model but lacks the all important Actor/Model combo).

Generally speaking, you want to turn on the Users checkbox so that individual users can add your app. You should think about what it means for your app to be available on Pages and should definitely go for it if you can, but make sure that you consider all the angles. If you’re building the most awesome Go Fish game ever made, what would it mean for a Rental Cars or Religious Organization Page to have a Profile Box for it?

Suggested Hello World value: Pages are going to have to live without your Hello World app because we’re making it available only to Users.

Figure 3-5. The bizarre mélange of controls that is the “Who can add your app” field

Post-Add URL

This one is simple: where do you want users to be sent once they’ve added your app to a Facebook Page? You’re generally going to put a Canvas page URL in here, which will usually be the app’s home page, but it might be a special welcome page or include a parameter in the URL to let your app know to display a welcome message. Consider having this point to an Invite Friends page that you show only to new users, which asks them to invite their friends into the app before they start using it (though this move is losing popularity as users feel more and more like they’re being pressured to buy a used car from a guy in a bad suit, so you might want to skip it). For more information, see http://wiki.developers.facebook.com/index.php/Post-Add_URL.

Suggested Hello World value: We’re not supporting Pages in this example, so you can leave this blank (or just use the value you put into Post-Authorize URL, described next).

Post-Authorize URL

This is similar to the Post-Add URL, but it’s for users authorizing your app to access their Profile for the first time rather than for users adding it to a Facebook Page.

Suggested Hello World value: Since Hello World is really just for you and we’re not worrying about inviting friends, we’re going to keep this simple and use http://apps.facebook.com/jays-fantastic-demo/.

Application Description

If you’re the kind of developer who has meticulously planned out every nook and cranny of your work of art well in advance, go ahead and fill in this box with your carefully crafted, 250-character marketing masterpiece. For everyone else, leave this field blank and come back to it after you’ve built the app and are ready to add it to the Application Directory.

Suggested Hello World value: Follow my advice and leave it blank for now.

Post-Remove URL

As George Santayana once said, “Those who cannot remember the past are condemned to repeat it.” Wouldn’t it be great if you could be notified whenever someone removes your app from a Facebook Page, so that you could track the circumstances and learn something from them? Well, you can! Enter a URL here and Facebook will ping it whenever your app gets un-added, and will provide some useful info, such as the person’s UID and a timestamp. You’ll find a whole lot more information, including some sample PHP, Rails, and pseudocode for handling

Return Main Page Previous Page Next Page

®Online Book Reader