Open application page from Facebook, vk.com

Hi guys.

I don’t understand hot to create deep links with params, to open iOS application page, when I put it to social networks post like Facebook or Vk.com.  Link redirect me to AppStore, not to app. And only when I open it from AppStore, opened needed page.

Same problem with Gogole short links.

Thx.

Traveler.Today — Developer
9 Answer(s)
Answered on August 11, 2016.

Hi there,

This is a known issue with Facebook. I’m not familiar with Vk.com, but I imagine they too could be blocking the launch of third-party apps directly from shared links. The workaround is to enable our deepviews feature for your links, because this will show a web preview with a button to launch the app. It’s an extra click for users and not ideal, but currently the best option!

Branch — Developer
Answered on August 12, 2016.

Alex, thx. I try to create and enable deepview and put Install/Open button, but have same result.  And if I enable deepview I loose direct link from another sites, messangers.

Traveler.Today — Developer
Answered on August 12, 2016.

Hmmm…and your app was opening as expected from every other location except for Facebook and Vk.com? This could possibly be a problem with Universal Links — what applinks: entries do you have in your Xcode Associated Domains configuration?

We can turn on deepviews for Facebook only, but I’m not sure about Vk.com. However, if Universal Links are configured correctly then in most situations users who have the app installed won’t see the deepview. The only time users who have the app installed will see the deepview is if the app couldn’t be opened directly anyway (Facebook and Vk.com, for example).

Branch — Developer
Answered on August 14, 2016.

Hi, Alex. Yes, app open ok from messangers, web sites. Only from Fb, universal link not work and opened AppStore.
It is our entitlements. May be some params or header l

<dict>
	<key>com.apple.developer.associated-domains</key>
	<array>
		<string>applinks:altay-io.traveler.today</string>
	         <string>applinks:hram.app.link</string>
		<string>applinks:alternate-hram.app.link</string>
        </array>
</dict>


Traveler.Today — Developer
Answered on August 14, 2016.

Ahh, yes there is the issue. You have applinks:alternate-hram.app.link and what is needed is applinks:hram-alternate.app.link.

Try updating this, and then the deepview button should fire correctly!

Branch — Developer
Answered on August 14, 2016.

Ok. I try it.

And we can’t open link from Fb directly?

Traveler.Today — Developer
Answered on August 14, 2016.

Unfortunately not. Facebook is blocking this, so the best alternative is to use deepviews for now.

Branch — Developer
Answered on August 18, 2016.

Hi. I have the same problem. I enabled Deepview and clicking the link from Facebook link will always open AppStore

Below is my applink entries

RE: Open application page from Facebook, vk.com

StationGo — Developer
Commented on August 18, 2016.

Hi there!

This sounds like a more general, non-Facebook-specific problem with Universal Links. Your applinks: entries are correct assuming the links you are using to test are generated with your Test key, so that removes one of the major problems. Could you run through the other items on our Universal Links troubleshooting guide and see if this fixes the problem?

Branch — Developer
Commented on August 18, 2016.

Hi Alex, I checked already. All seems correct. Im not doing anything related to bnc.lt.

=/

Hows my app delegate below?

 

@available(iOS 9.0, *)
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
SGLogger.logDebug("START")
 
if (!Branch.getInstance().handleDeepLink(url)) {
// do other deep link routing for the Facebook SDK, Pinterest SDK, etc
if (url.URLString.containsString("com.googleusercontent.apps")) {
return GIDSignIn.sharedInstance().handleURL(url, sourceApplication: options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String?, annotation: options[UIApplicationOpenURLOptionsAnnotationKey])
}
else {
return FBSDKApplicationDelegate.sharedInstance().application(app, openURL: url, sourceApplication: options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String?, annotation: options[UIApplicationOpenURLOptionsAnnotationKey])
}
}
return true
}
 
 
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
 
[more codes here]
 
// configure Facebook
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
 
// for Google Conversion Tracking
ACTConversionReporter.reportWithConversionID("xxxx", label: "xxxx", value: "0.00", isRepeatable: false)
 
Branch.getInstance().accountForFacebookSDKPreventingAppLaunch()
// for deep linking using Branch
Branch.getInstance().initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { optParams, error in
 
if error == nil, let params = optParams {
}
else {
SGLogger.logDebug("error=\(error.description)")
}
})
return true
}
 
 
func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
SGLogger.logDebug("userActivity=\(userActivity)")
// pass the url to the handle deep link call
Branch.getInstance().continueUserActivity(userActivity);
return true
}
 

 

 

StationGo — Developer
Commented on August 19, 2016.

The AppDelegate looks OK to me, but that has no impact on Universal Links so it won’t be the issue here. Do Universal Links work correctly for you when opened from the default Notes App?

Branch — Developer
Commented on August 21, 2016.

Yes Alex. Link from Notes can open the app directly.

So weird. I checked everything. All seems correct =/

 

StationGo — Developer
Commented on August 21, 2016.

Ahhhh yes, in that case this is the expected behavior. See my earlier response for more info:

“This is a known issue with Facebook. […] The workaround is to enable our deepviews feature for your links, because this will show a web preview with a button to launch the app. It’s an extra click for users and not ideal, but currently the best option!”

 

Branch — Developer
Commented on August 21, 2016.

Yeah. I already enabled Deepview. But after clicking the ‘Get the app’ button there, it always goes to AppStore.

 

StationGo — Developer
Commented on August 21, 2016.

 

Ahh, that is very strange. Since you have no trouble opening the app from Notes, that rules out most of the usual Universal Links issues. I think at this point you’ll probably want to submit an Integrations ticket so we can take a peek on the backend too.

Branch — Developer
Answered on August 18, 2016.

It work fine for me. Check your config.

 

Alex, Deepview working, but path params from marketing link not added. I use “href=”{{action}}”” at link.

Traveler.Today — Developer
Commented on August 18, 2016.

@ivan which config?

 

StationGo — Developer
Commented on August 18, 2016.

Ivan, I’m afraid it’s not completely clear to me what isn’t working here. Could you give some additional details and examples to help me track down the issue?

Branch — Developer
Commented on August 18, 2016.

Alex, I mean that when I use marketing link with custom deep link data (custom params to open custom page in app), this params not included after I click to “open” link in Deepview.

Traveler.Today — Developer
Commented on August 18, 2016.

That is very odd. We usually don’t have any issues with this, so it sounds like some sort of configuration problem. Could you share an example marketing link with custom params set where you are seeing this incorrect behavior?

 

Branch — Developer
Commented on August 18, 2016.

 

 

Mm, Already working 😉 May be not always stable.

And new question: can I add custom information (about custom page) at deeview? Not only one page.

Traveler.Today — Developer
Commented on August 19, 2016.

Glad it’s working. How strange there was an issue before!

You definitely can do customizations. Take a look at our documentation page here.

Branch — Developer
Commented on August 19, 2016.

Thanks!

Traveler.Today — Developer