Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase dynamic links not show image on sharing in whatsapp and redirection to AppStore/PlayStore

I have requirement of sharing the product link with title, description and image on social media.

I tried fire-base dynamic links for deep-linking it works perfectly fine but I was not able to get the image while sharing the link in Whats-App. As we want this to work in whatsapp so please have any idea for firebase dynamic link than I prefer that.

I have also used the Open graph(og) tags and twitter card for twitter and try to redirect to app using java script.Below is java-script.

    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;
    }

The script helps to redirect to app when app is installed but when app is not install in mobile it not redirect to play-store or app-store.

Need any other solution if have.

like image 933
Shah Harsh Avatar asked Dec 19 '22 05:12

Shah Harsh


1 Answers

The problem was that the image criteria of the image on WhatsApp. The image(JPG or PNG) must have a size of less than 300KB and a minimum dimension of 300 x 200 pixel.

like image 107
Shah Harsh Avatar answered Dec 24 '22 02:12

Shah Harsh