I upgraded my game to use the facebook SDK 3.1 and it works for iOS 6 and I want it to work on iOS 5 also. I want it to show the facebook preview of the post like it did in SDK 3.0.
Here's my code. Right now it just posts automatically. Does Facebook now allow automatic shares and status updates without the user typing their status? Facebook did not used to allow this.
if(!displayedNativeDialog)
{
NSLog(@"\nNative dialog failed to display.");
[self performPublishAction:^{
// otherwise fall back on a request for permissions and a direct post
NSMutableDictionary* params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:[NSString stringWithFormat:@"%s", m_pLink], @"link", [NSString stringWithFormat:@"%s", m_pGameName], @"name", nil];
[FBRequestConnection startWithGraphPath:@"me/feed" parameters:params HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
[self showAlert:message result:result error:error];
}
];
}];
tkanzakic pointed out to the right answer, so I will just repost the link again because someone might not see it on the answer reply.
https://github.com/sakrist/FacebookSample
I tested this framework and it works well. It's follows the facebook sdk specifications.
thanks,