1
votes

In my iOS app, I am posting videos link (e.g. YouTube video link) and when user click on these link from native Facebook app of iOS the video should open in my app. When I post videos link it shows same as when we post video link from our Facebook profile (suppose post video link then it automatically fetch its info and post it as thumbnail image with some information).

So the problem is when I click on this post from native Facebook app of iOS it is opening in webview instead of open my app. I also enabled "Deep Linking" in facebook app settings of application. The code I use is shown below

 SLComposeViewController *fbVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];

[fbVC setInitialText:@"Check out this video :"]; 
[fbVC addURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=NoVW62mwSQQ"]]; //youtube video is example 
[self presentViewController:fbVC animated:YES completion:nil];

And if post this link from "setInitialText" parameter then it is simple shows as link (not as a automatic rectangle with thumbnail image and some info ) then it open app but I do not want in this way because it also shows value passed in "deeplink" parameter like "http://www.youtube.com/watch?v=NoVW62mwSQQ/?deeplink=mypost" in the post.

1

1 Answers

2
votes

The deep linking is available only for the post made by your application not on the link shared by the users. For example a youtube video is opened in webview not in the application. A possible solution is to catch the device from your website and then open the app.