Currently, I am facing a requirement where I need to share a product link on social media with the title, description, and image included.
I initially tried using Firebase dynamic links for deep-linking which worked perfectly, but I encountered an issue when sharing the link on WhatsApp as the image was not appearing. Since it is crucial for this functionality to work seamlessly on WhatsApp, I am open to any suggestions or alternatives related to Firebase dynamic links that could resolve this issue.
In addition, I also experimented with Open Graph (og) tags and Twitter cards for Twitter integration, attempting to redirect users to the app using JavaScript. Below is the snippet of JavaScript code used:
var now = new Date().valueOf();
setTimeout(function () {
if (new Date().valueOf() - now > 600) return;
RedirectToMarket();
}, 500);
var deepUrl = getParameterByName('deepUrl');
var url = encodeURI(deepUrl);
if (url) {
window.location = url;
}
While the script successfully redirects users to the app if it's already installed, it fails to redirect users to the Play Store or App Store in case the app is not installed on their mobile device.
If anyone has an alternative solution to address this challenge, I would appreciate any insights or recommendations.