-2

I have made an app and I want to create a UIButton that shares this app with facebook users. I wrote the following code:

if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
    SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
    [controller setInitialText:@"My App Name"];
    [controller addURL:[NSURL URLWithString:@"https://itunes.apple.com/il/app/fruit-ninja-free/id403858572?mt=8/"]];
    [self presentViewController:controller animated:YES completion:Nil];
}
else {

}

I've used an example URL of the famous fruit ninja cause my app is not yet on the app store and doesn't have it's own URL.

The issue: If the app is not yet on iTunes, I don't have an iTunes URL to share yet... So how do I share my app?

Help is much appreciated...

Nimrod Shai
  • 1,149
  • 13
  • 26
  • Have you tried just sharing the url as just a string? It should detect that it's a url within Facebook (normally) and make it into a hyper-link – Jim Tierney Jul 29 '14 at 09:23
  • You can just post the link, Facebook will detect it and create a little card-preview similar. – MCKapur Jul 29 '14 at 09:40
  • Pass url as a string and facebook automatically detect it as a link – Indrajeet Jul 29 '14 at 09:43
  • I don't understand your question. is your problem how to put your app's link _before_ you have a link to you app, or what exactly? – holex Jul 29 '14 at 10:27
  • I thought my question was clear but apparently I was wrong :) I updated the question with "The issue:" part... Should be clearer now... By the way, holex, yes, this is my question :) – Nimrod Shai Jul 29 '14 at 12:32

1 Answers1

1

You should create stub for your app at iTunes Connect. After that you'll be able to get link to your application even before submission.

View in App Store

Sviatoslav Yakymiv
  • 7,887
  • 2
  • 23
  • 43