0

Here is the code I use. I am able to see popup but I do not see the text pre-populated in the facebook popup.

Any suggestions?

- (IBAction) shareViaFacebook
{

    [self prepareToShare];

    // create the item to share
    NSString *share = [NSString stringWithFormat:@"I'm tracking %@ in some stuff, check it out! http://somewebsite.com/g/%d @TEST", 
                       self.game.name, 
                       [self.game.serverId intValue]];

    SHKItem *item = [SHKItem text:share];

    // share the item
    [SHKFacebook shareItem:item];
}

On the same age, the following code for twitter works just fine. That is everything gets prepopulated

- (IBAction) shareViaTwitter
{
    [self prepareToShare];

    // create the item to share
  NSString *share = [NSString stringWithFormat:@"I'm tracking %@ in some stuff, check it out! http://somewebsite.com/g/%d @TEST", 
                           self.game.name, 
                           [self.game.serverId intValue]];

    SHKItem *item = [SHKItem text:share];

    // share the item
    [SHKTwitter shareItem:item];
}
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169

1 Answers1

1

This is an example from my project using ShareKit:

NSString *finalPostedString = [[NSString alloc] initWithFormat:@"Check out this"];
SHKItem *item1= [SHKItem text:finalPostedString];   
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item1];
[actionSheet showInView:self];

Try that out and hopefully it helps.

EDIT: Or more specifically, check this thread out that also should answer your question: iPhone/iOS - How to use "ShareKit" to post only to Facebook or only to Twitter

Community
  • 1
  • 1
Brayden
  • 1,795
  • 14
  • 20
  • yeah I did follow instructions and still the Post to Wall screen is empty. The funny thing is that very similar code works for Twitter fine. – Strong Like Bull Nov 23 '11 at 05:46
  • I would go through and do the following to help narrow down your issue, even if it works for Twitter it doesn't hurt treating this from a fresh standpoint. 1) Double check your Facebook credentials are correct in SHKConfig.h 2) Try a simple string, or heck, narrow it down to something more simple like this: `SHKItem *item = [SHKItem URL:url title:@"Share Me!"]; [SHKFacebook shareItem:item];` 3) See if you get varying results displaying it from an actionSheet as done above - shot in the dark of course if the first two don't help. – Brayden Nov 23 '11 at 06:08
  • sure I will try that. FYI, the post does post on facebook. It just is empty. I will try the other two. – Strong Like Bull Nov 23 '11 at 06:11