With the new changes in facebook, deeplinks to app (shared via basic sharing) not work anymore.
So, I decided to implement applinks. But my mobile app does not have corresponding web site for the content i want to share to Facebook. So i choose facebook's mobile hosting API for app links
https://developers.facebook.com/docs/applinks/hosting-api
I generated an app link and share it in my ios app along with the other contents as bellow.
// Create an object
NSDictionary *properties = @{
@"og:type": @"article",
@"og:url": @"https://fb.me/[some id]",
@"og:title": name,
@"og:description": desc,
@"og:image":imageurl
};
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
// Create an action
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"news.publishes";
[action setObject:object forKey:@"article"];
// Create the content
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"article";
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
shareDialog.fromViewController = self;
shareDialog.shareContent = content;
[shareDialog show];
By doing this, i can share the content in facebook. Upon tap on the content, my iOS app can launch. So it's fine.
But my problem is, The content i want to share is dynamic. I have two questions.
- Can i create facebook applinks for dynamic contents?
- Once open the app from deeplink, I want to navigate user to the content screen inside my app. But i cannot do it because i cannot see any thing releated to share content in the url received in - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options method
I want to know is this requirement achievable via facebook's mobile hosting API for app links.