flutter-simple-url-preview icon indicating copy to clipboard operation
flutter-simple-url-preview copied to clipboard

Firebase Dynamic Link not previewing correctly

Open iqfareez opened this issue 3 years ago • 4 comments

I have long url, say https://flutree.web.app/NWfLo and I shorten it, adding social metadata in app and it became https://flut.page.link/hcpa.

So, when tap the shorten link, it should redirect to the long link.

The problem is, this package returns a preview of the redirected link, not the Firebase Dynamic Link one.

My Code:

SimpleUrlPreview(
      url: 'https://flut.page.link/hcpa',
      bgColor: Colors.white,
),

Screenshot: This package: image

How I want it to look like: image

iqfareez avatar Aug 03 '21 06:08 iqfareez

@iqfareez yes, that is because we make HTTP call to the URL. Now as that URL redirects it to resultant URL, you will be shown resultant URL's preview..

Amitbhave avatar Aug 08 '21 03:08 Amitbhave

I see. Understood but you have any idea I can get the preview of the dynamic link itself?

iqfareez avatar Aug 08 '21 05:08 iqfareez

@iqfareez can you tell me more about the requirement here? The screenshot that you have shared, is it the dynamic link's preview shown in whatsapp?

Amitbhave avatar Aug 08 '21 06:08 Amitbhave

@Amitbhave I'm not really sure about the requirement. The docs not really helpful. The link preview (that I want) works on major social platform (WhatsApp, Twitter etc).

Dynamic Link social preview doc: https://firebase.google.com/docs/dynamic-links/link-previews

iqfareez avatar Aug 08 '21 06:08 iqfareez