iOS Question deep linking

tufanv

Expert
Licensed User
Longtime User
Hello

In my facebook page i want to add use app button to my page. For that , facebook requires android and ios deep links when the user click on the button. There are examples for android but ios i only could find
https://www.b4x.com/android/forum/threads/register-url-scheme.46237/#content

With this , i can open my app with link :
http://tahminhane.com/mobil/index.php?url=placetogo

and in the app i retrieve this with applicatin_openurl as in the tutorial above and i can go to a specific place
BUT
facebook requires a deeplink and i cant use a link like
http://tahminhane.com/mobil/index.php?url=placetogo

What can i do ? altough i can make the users open app externally with this link and navigate to a specific place in my app i cant use it with facebook.

Thanks
 

tufanv

Expert
Licensed User
Longtime User
You need to change 'example' with your unique scheme (that you have previously registered with #UrlScheme attribute) and set it here: https://developers.facebook.com/docs/applinks/add-to-content
I tried the html code in the example but that does not open the app where a my php can open it successfuly. my php code is like this: ( taken from a snippet in b4i forum )

B4X:
<?php
$ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad');
$iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone');

if ($iphone or $ipad ) {
$url = $_GET['url'];
header('location: com.ctmobilesoft.tahminhane://'.$url);
}else{
echo("No iPhone or iPad");
}
?>

this works fine , but if the app is not installed it does not direct to appstore. You posted alink to stackoverflow but i couldnt understood what they are talking about ( the javascript etc.. )
 
Upvote 0
Top