walidiphone
walidiphone

Reputation: 41

facebook sharekit

I tried to used Sharekit to share a message from my iPhone application but the message didn't appear.

Here is my code:

-(IBAction) facebook
{
    [SHKFacebook shareText:@"test"];
}

thanks for your help

Upvotes: 1

Views: 917

Answers (2)

Chakalaka
Chakalaka

Reputation: 2827

use this if you dont want to show an actionsheet.

SHKItem *item = [SHKItem image:image title:title];
[SHKFacebook shareItem:item];

Upvotes: 1

Jane Sales
Jane Sales

Reputation: 13546

You need to create an SHKItem, and then share it. Something like this

 NSString* shareText = @"text";
 SHKItem* item = [SHKItem text:shareText]; // make the SHKItem
 item.title = @"Test title";

 // Make the ShareKit action sheet
 SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];

 // Display the action sheet
 [actionSheet showInView:self.view];

Upvotes: 1

Related Questions