I have just integrated facebook into my app via ios 6 but I have an issue when posting on my wall. It simply says \"post via ios app\". I want it to say
I ended up using a custom Facebook framework with the new Facebook SDK 3.1. Facebook Compose View
The original is here: facebook compose view. I've just fixed a few minor warnings and updated with the new FB SDK 3.1.
Usage:
DEFacebookComposeViewControllerCompletionHandler __block completionHandler = ^(DEFacebookComposeViewControllerResult result) {
[self dismissViewControllerAnimated:YES completion:nil];
switch (result) {
case DEFacebookComposeViewControllerResultCancelled:
NSLog(@"Facebook Result: Cancelled");
break;
case DEFacebookComposeViewControllerResultDone:
NSLog(@"Facebook Result: Sent");
break;
}
};
DEFacebookComposeViewController * compose = [[DEFacebookComposeViewController alloc] init];
[compose setInitialText:self.shareText];
[compose addImage:self.shareImage];
[compose addURL:self.shareURL];
[compose setCompletionHandler:completionHandler];
[self presentViewController:compose animated:YES completion:^{}];
Setup:
$PROJECT_FOLDER\build\Debug-iphonesimulator
and drag both the FBComposeView.framework
& FBComposeView.bundle
into your project.Note: Be sure to use the ones in the Debug-iphonesimulator
. It is the fat binary.