Skip to content

Commit

Permalink
Updates to README for platform dialogs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Brusstar committed Dec 8, 2010
1 parent c0ee436 commit e88e8dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ Usage

Begin by instantiating the Facebook object:

Facebook* facebook = [[Facebook alloc] init];
Facebook* facebook = [[Facebook alloc] initWithAppId:appId];

Where _appId_ is your Facebook application ID string.

With the iOS SDK, you can do three main things:

Expand Down Expand Up @@ -96,8 +98,8 @@ To authorize a user, do the following:

* Finally, make a call to the _authorize_ method:

Facebook* facebook = [[Facebook alloc] init];
[facebook authorize:appId permissions:permissions delegate:self];
Facebook* facebook = [[Facebook alloc] initWithAppId:appId];
[facebook authorize:permissions delegate:self];

Where _appId_ is your Facebook application ID string, _permissions_ is an array of strings containing each permission your application requires, and _delegate_ is the delegate object you wish to receive callbacks. For more information, refer to the code or sample application.

Expand Down Expand Up @@ -155,12 +157,11 @@ The [Old REST API](http://developers.facebook.com/docs/reference/rest/) is also
Displaying Dialogs
------------------

This SDK provides a method for popping up a Facebook dialog. The currently supported dialogs are the login and permissions dialogs used in the authorization flow, and a dialog for publishing posts to a user's stream.
This SDK provides a method for popping up a Facebook dialog. The currently supported dialogs are the login and permissions dialogs used in the authorization flow, and a dialog for publishing posts to a user's feed.

To invoke a dialog:

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: apiKey, @"api_key", nil];
[facebook dialog:@"stream.publish" andParams:params andDelegate:self];
[facebook dialog:@"feed" andDelegate:self];

This allows you to provide basic Facebook functionality in your application with a singe line of code -- no need to build native dialogs, make API calls, or handle responses. For further examples, refer to the included sample application.

Expand Down
4 changes: 2 additions & 2 deletions src/Facebook.m
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ - (void)requestWithGraphPath:(NSString *)graphPath
*
* @param action
* String representation of the desired method: e.g. "login",
* "stream.publish", ...
* "feed", ...
* @param delegate
* Callback interface to notify the calling application when the
* dialog has completed.
Expand All @@ -505,7 +505,7 @@ - (void)dialog:(NSString *)action
*
* @param action
* String representation of the desired method: e.g. "login",
* "stream.publish", ...
* "feed", ...
* @param parameters
* key-value string parameters
* @param delegate
Expand Down
4 changes: 2 additions & 2 deletions test/UnitTest/Classes/UnitTestViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ - (void) verifySessionInvalid {
nil];


[_facebook dialog: @"stream.publish"
[_facebook dialog: @"feed"
andParams: params
andDelegate:self];

Expand Down Expand Up @@ -161,7 +161,7 @@ - (void) testStreamPublish {
nil];


[_facebook dialog: @"stream.publish"
[_facebook dialog: @"feed"
andParams: params
andDelegate:self];

Expand Down

0 comments on commit e88e8dd

Please sign in to comment.