我试图在我的iOS应用中实现深层链接,到目前为止,我可以发布到我的墙上,但只有帖子才真正链接到google.com(显然这是一个测试链接)。我希望用户在通过Facebook应用程序点击帖子时导航到我的应用程序,请我需要一步一步的指导因为Facebook文档有点复杂。这是我的代码:
- (void)shareOnFacebookWithName:(NSString *)contentTitle withDescription:(NSString *)contentDescription withLink:(NSString *)contentURL withPictureLink:(NSString *)imageURL andViewController:(UIViewController*)viewController{
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:contentURL];
content.contentTitle = contentTitle;
content.imageURL = [NSURL URLWithString:imageURL];
content.contentDescription = contentDescription;
[FBSDKShareDialog showFromViewController:viewController
withContent:content
delegate:self];
}