I simply want a user to be able to post their score to a Facebook wall. Similar to how it is done with he twitter framework. I have looked into FBConnect but that is more than i want the application to do. I would like it o simple post the score. Thanks
Asked
Active
Viewed 298 times
2 Answers
2
Even if you just want to post score to a Facebook wall, you have to follow Facebook rules. To protect their users' privacy, Facebook wants you register your app and ask the user to log in and to authorize your app to interact with its account.
Actually, I think that FBConnect is the easiest way to get your goal. Otherwise, you could create your own class to manage any single required step, but still you have to ask your user to log in and to authorize interaction.
Unfortunately, I'm afraid there are not any workaround to simplify that...

Giuseppe Garassino
- 2,272
- 1
- 27
- 47
0
I would recommend following Facebook Rules, but this code works:
- (IBAction)buttonPostMessageFacebook:(id)sender {
NSString *stringFacebookKey = [[NSUserDefaults standardUserDefaults] stringForKey:@"key_Facebook"];
if ([stringFacebookKey isEqual:@"1"]) {
NSString *postText = [NSString stringWithFormat:@"I just posted a message to Facebook with an image named ''socialsharing-facebook-image.jpeg'' !"];
UIImage *postImage = [UIImage imageNamed:@"socialsharing-facebook-image.jpeg"];
SLComposeViewController *composeController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[composeController addURL: [NSURL URLWithString:@"http://www.montronik.com"]];
[composeController setInitialText:postText];
[composeController addImage:postImage];
[self presentViewController:composeController animated:YES completion:nil];
};

David Riccitelli
- 7,491
- 5
- 42
- 56

Scuttle
- 165
- 3
- 11