问题
Links created using branch.io when shared on Facebook; they do not open App or Default browser rather they are opened in facebook's webview.
Is there any custom setting that we need to do; so link gets opened on App if available or in default browser when app does not exists.
回答1:
The default behavior of any link Facebook is to open the link in the Facebook webview. Unfortunately, there is no way to change this behavior.
Although, as a workaround, you can use Branch Deepviews to open your app from Facebook. The behavior would be as follows:
- Share the Branch link for your app on Facebook
- Click on the Branch link from the Facebook App
- This will open the Branch Deepview in the Facebook's webview with an Get/Open in App button
- Clicking on the button should redirect you straight to your app.
You can activate Deepviews for:
The entire app: By visiting the Deepview page on the Branch dashboard here and enabling a particular Deepview.
For a Branch quick link: By setting the iOS/Android redirect to Deepviews as shown below:
- For any other Branch link: By adding the
$ios_deepview
and$android_deepview
parameters to the links.
For more information, refer to Branch's documentation on expected link behavior here and on Deepviews here.
回答2:
Recently I faced similar issue, It doesn't work for facebook by default. We have to handle it.
I handled it to navigate inside the app on deeplink data, all I had to do was set parameters in branch link property $deeplink_path.
We will get this data as part of url and need to parse and get data inside Appdelegate's openURL methods. Add navigation logic inside OpenUrl methods.
来源:https://stackoverflow.com/questions/47797305/does-branch-io-links-work-on-facebook