Purpose
1) To create Deep Link to the Facebook app on the user's phone via an SMS.
1.1) To do this via a URL in the SMS to a web page with PHP that redirects to the Facebook app via the user's browser.
Question
Is something wrong with the parameters I am sending fb:// for iOS? I can open the video in the Facebook app on Android but not on iOS. For many of the links, however, it does open the Facebook app but will not take me to the location I want within the app.
What I have so far
I am not an Android/iOS developer so apologies if I am using any terms incorrectly.
- I couldn't find a way of Deep Linking directly from an SMS.
- I decided the most viable solution would be to use a URL to a PHP page that 1) detects the user's device and 2) redirects the user to the Facebook app using Deep Links.
- I found this list of Facebook App Deep Links and used it to figure out a solution.
Android - Chrome
I can open the Facebook video and profile in the Facebook App using the following Deep:
<?php
// Works
header( 'Location: fb://video/?id={insertidhere}' );
header( 'Location: fb://profile' );
// Fails
header( 'Location: fb://page/?id={insertidhere}' );
header( 'Location: fb://page/?id=insertidhere' );
?>
iOS/iPhone - Safari
For iOS based devices, I ran into trouble with the video. Sometimes, my links open the app but they reach the latest page visited by the user in the app.
Here are the Deep Links I've experimented with so far:
<?php
// Fails
header( 'Location: fb://video?id=vb.insertidhere' );
header( 'Location: fb://video/?id=insertidhere' );
header( 'Location: fb://video?id={insertidhere}' ); // Does not open the app
header( 'Location: fb://post/?id=insertidhere' );
// Works
header( 'Location: fb://page/?id=insertidhere' )
header( 'Location: fb://profile' );
?>
I am guessing I am using the Deep Links wrong. If you guys have a good source on how Deep Links work so I could learn more I would also really appreciate that. My immediate concern is making the Deep Link to Facebook videos from a web browser work in iOS.
Thank you!