Skip to content

Instantly share code, notes, and snippets.

@desaiashu
Created February 4, 2013 21:51
Show Gist options
  • Save desaiashu/4710037 to your computer and use it in GitHub Desktop.
Save desaiashu/4710037 to your computer and use it in GitHub Desktop.
Feed dialog to post on wall in Facebook SDK 3.1
1. Add the deprecated header "Facebook.h" to your project (it is included in the .framework)
2. In the completion handler of opening the session, create a facebook variable and set it's info to the session's info
facebook = [[Facebook alloc] initWithAppId:FBSession.activeSession.appID andDelegate:nil];
// Store the Facebook session information
facebook.accessToken = FBSession.activeSession.accessToken;
facebook.expirationDate = FBSession.activeSession.expirationDate;
3. To post to wall use this line (if you add a "to" key to the params dictionary you can post on a friend's wall):
[facebook dialog:@"feed" andParams:params andDelegate:self];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment