Telerik-Verified-Plugins / Firebase-Invites

:wave: Invite your contacts to install and use your app via Email or SMS
7 stars 31 forks source link

sms link doesn't work #11

Open scrabionau77 opened 6 years ago

scrabionau77 commented 6 years ago

I'm using your plugin in a Cordova app. My problem is the url sent in email and sms. If the app is already installed, the plugin receives the invite without problem. If the app isn't installed, i'm redirect to Apple/Play Store but, when i open app, plugin doesn't receives the invite.

The problem seems to be in the coding of the link executed by firebase (perhaps!). I've found a workaround for invites sent by e-mail using emailHtmlContent:

FirebaseInvites.sendInvitation(
    {
        title: "Invites friends!", // mandatory, see the screenshots for its purpose
        message: "My Text!",
        deepLink: "myapp://deeplink",
        emailSubject: "Email Object",
        emailHtmlContent: "<a href='https://MY_LINK'>DOWNLOAD</a>", // *** WORKAROUND ***
        androidClientID: ".......",
        iosClientID: "......."
        },
        function (result) {
            console.log("Sent " + result.count + " invites");
            console.log("Invitation ID's: " + JSON.stringify(result.invitationIds));
        },
        function (msg) {
            console.log(msg);
        }
    );

So, the link works in email (if app isn't installed, i'm redirect to Apple/Play Store and i receive invite when i open app).

The problem persists with sms. I've found another workaround for this:

FirebaseInvites.sendInvitation(
    {
        title: "Invites friends!", // mandatory, see the screenshots for its purpose
        message: "My Text! https://is.gd/xxxxx", // *** WORKAROUND ***
        deepLink: "myapp://deeplink",
        emailSubject: "Email Object",
        emailHtmlContent: "<a href='https://MY_LINK'>DOWNLOAD</a>",
        androidClientID: ".......",
        iosClientID: "......."
        },
  .....

Adding a short url in 'message', i receive it in sms text and it work properly (if app isn't installed, i'm redirect to Apple/Play Store and i receive invite when i open app). But sms contains 2 link: the link i added and the link added by Firebase (this does not work).

Is there a way to hide the firebase link? Sorry for my english and thanks in advance to everyone

super9xman commented 6 years ago

Hi, I am having the same problem with sms links...did you figure our a solution?