firebase dynamic link preview link not working with facebook messenger
Asked Answered
M

2

7

Created firebase dynamic short link will not preview correctly in facebook messenger. It puts up the message and link as expected and shows a preview image with url.

The url included in the message is working but not the url if I click on the preview.

The url should be : https://q3zbm.app.goo.gl/8f7b but the preview link becomes https://q3zbm.app.goo.gl/s?socialDescription=Welcome&socialImageUrl=http://andreasandersson.nu/images/awesome-photo.jpg&socialTitle=Gooo

I was able to reproduce this in a very small program

private void generate() {
    DynamicLink.SocialMetaTagParameters.Builder params = new DynamicLink.SocialMetaTagParameters.Builder();
    params.setImageUrl(Uri.parse("http://andreasandersson.nu/images/awesome-photo.jpg"));
    params.setDescription("Welcome");
    params.setTitle("Gooo");

    FirebaseDynamicLinks.getInstance()
        .createDynamicLink()
        .setLink(Uri.parse("http://andreasandersson.nu"))
        .setDynamicLinkDomain("q3zbm.app.goo.gl")
        .setIosParameters(new DynamicLink.IosParameters.Builder("ios.app.example").build())
        .setAndroidParameters(new DynamicLink.AndroidParameters.Builder().build())
        //.setSocialMetaTagParameters(params.build())
        .buildShortDynamicLink(SHORT)
        .addOnCompleteListener(new OnCompleteListener<ShortDynamicLink>() {
            @Override
            public void onComplete(@NonNull Task<ShortDynamicLink> task) {
                if (task.isSuccessful()) {
                    Uri shortLink = task.getResult().getShortLink();
                    Uri flowchartLink = task.getResult().getPreviewLink();
                    Intent shareIntent = new Intent();
                    shareIntent.setAction(Intent.ACTION_SEND);
                    shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    shareIntent.putExtra(Intent.EXTRA_TEXT, "check this:" + shortLink.toString());
                    shareIntent.setType("text/plain");
                    startActivity(Intent.createChooser(shareIntent, "share"));
                }
            }
        });
}

I know that the app values are not correct but inputting correct ones gives no difference in the result.

Is this an error on the firebase dynamic link or is the problem with facebook messenger? When doing the exact same thing from ios it is working as intended which should mean that this is a android related issue with the sharer?

Update: Thanks for contacting FIrebase support. This is an issue with Facebook that we already raised to them. As of now, we are yet to hear any updates from them, but once we do, we'll let you know.

Mymya answered 3/4, 2018 at 19:35 Comment(5)
Update: Thanks for contacting FIrebase support. This is an issue with Facebook that we already raised to them. As of now, we are yet to hear any updates from them, but once we do, we'll let you know.Mymya
Hello @AndreasAndersson. do you have any news on this?Aleman
Sorry I haven't heard anythingMymya
my response from FB: "After much investigation with the issue, the guidance from the team is that unfortunately, this issue is not specific to API platform. Rather, it's the inherent In-App browser behavior and should be surfaced via: Settings->Report a problem->A description and a video of the issue.". I've sent report... waiting again.Aleman
Thanks for the update, I haven't heard anything from firebase team, pretty anoying. will report as wellMymya
D
1

I think that Facebook will not allow this because it would be in violation of their Fake news issue. The ability to change the image used when sharing links was removed and the Firebase meta info would allow you to circumvent this.

Update

After playing around with URL's it turns out I had a trailing "/" before "?" which was preventing the link working with Facebook. Using firebase links we can now set all meta info and provide custom thumbnails again.

Dyslalia answered 17/4, 2018 at 8:18 Comment(0)
W
0

I filed the similar question to Firebase support before. According to their support, it seems that it's on Facebook's side and they've filed a bug on Facebook. They also provided the bug tracker (https://business.facebook.com/direct-support/question/124595778189376/?force_full_site=0&business_id=191383518008569) but it appears I don't have necessary access to view the tracker, so I think this might also apply to you.

Wether answered 13/4, 2018 at 12:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.