Skip to content

Instantly share code, notes, and snippets.

@mike3k
Created May 11, 2011 01:33
Show Gist options
  • Save mike3k/965744 to your computer and use it in GitHub Desktop.
Save mike3k/965744 to your computer and use it in GitHub Desktop.
Use ShareKit for individual items
- (IBAction)tweet:(id)sender
{
SHKItem *aTweet = [SHKItem text: [NSString stringWithFormat:
@"I just scored %@ in @SugarRushApp! How high can you jump? http://sugarrush-app.com/",
[UserSettings get].formattedScore]];
[SHKTwitter shareItem:aTweet];
}
- (IBAction)facebook:(id)sender
{
SHKItem *post = [SHKItem text: [NSString stringWithFormat: @"I just scored %@ in Sugar Rush!",[UserSettings get].formattedScore]];
post.URL = [NSURL URLWithString:@"http://sugarrush-app.com/"];
// post.image = [UIImage imageNamed:@"player-icon-hd.png"];
[SHKFacebook shareItem:post];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment