I am creating an iOS application and I am adding some sharing options. I already downloaded the Facebook 3.0 SDK and placed it in my project in accordance with the Facebook developer page. All I need my application to do is post text-only status updates to Facebook when a certain button is clicked on an UIActionSheet. Here is the code I have so far:
#import <FacebookSDK/FacebookSDK.h>
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0) {
NSArray *permissions = [NSArray arrayWithObject:@"publish_actions"];
[FBSession openActiveSessionWithPermissions:permissions allowLoginUI:YES
completionHandler:^(FBSession *session,
FBSessionState status,
NSError *error) {
// session might now be open.
if (session.isOpen)
//don't know what to do from here
}];
}
}
I don’t know where to proceed from here. The authentication takes place and then the Facebook app on my iPhone opens and that is the end of it. Also, if there is anything else I should add that I am missing PLEASE let me know. I am new to Facebook SDK.
Facebook’s iOS documentation covers this very nicely in their sample application and tutorials.
Specifically