I am sharing my post on Facebook. I am sharing Image, Content URL, Description. I am using this code for sharing:
FBSDKShareDialog *dialog = [[FBSDKShareDialog alloc] init];
dialog.fromViewController = self;
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentTitle = APP_NAME;
content.contentDescription = text;
content.imageURL = [NSURL URLWithString:[[arrAllEvents valueForKey:@"flyer_image"]objectAtIndex:0]];
content.contentURL = url;
dialog.shareContent = content;
dialog.mode = FBSDKShareDialogModeFeedWeb;
[dialog show];
I have enable Deep Linking (News Feed links launch this app) option for https://developers.facebook.com. I have added my Fbid and URLShema Like this
<key>CFBundleURLSchemes</key>
<array>
<string>abcevent://</string>
<string>fb1......</string>
</array>
and add code in appdelegate.m for the same like this
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url,NSError *error){
if([[url scheme] isEqualToString:@"abcevent"])
{
[self callNewsletter:url];
}
}];
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
[FBSDKAppEvents activateApp];
}
Now if I am sharing my post on fb via application. That post click is not opening my app in iPhone Deep linking is not working. Can anyone tell what other things I am missing with this?
<string>abcevent://</string>
it is<string>abcevent</string>
– Anbu.Karthik