Displaying Link Previews

Hi,

Being someone with no (and I mean no) coding skills, I may very well get all the terminology wrong here, but…

I am wondering how to go about displaying content (images, headlines, text etc.) form a url link, similar to Facebook / LinkedIn etc. I believe it may be termed as a ‘Link Preview’.

For example, when I paste a link on Facebook to a web page, it displays the main image, headline, text etc.

Is there a way to go about that so I can achieve the same effect on my bubble app for links users want to share?

** Update ** I have found plugins available for other platforms (mainly WordPress). Any possibility of something appearing for Bubble?

1 Like

You can set this in the Settings tab. Which will set the tags for every page of your app.

But if you want the tags and image to be specific to the page of your website you are sharing, then you can also set it on the actual page of your app, and even make it dynamic information. I have noticed that the image sometimes doesn’t work or show up distorted depending on it’s size

1 Like

Hi Geoff. Thanks for the reply.

Actually, I am trying to establish how to fetch that information from other sites so that a user can input or copy/paste a link on a social feed page on my app and have it work like FB or LinkedIn (for example).

I don’t know if it is possible usin dynamic images and text somehow, or with a plugin, or HTML, or a combination. Must be possible but may require some coding knowledge I just don’t have.

Ahh got it.

In this case I am not certain how to proceed, but I imagine you would need to use an API to some type of web scraper to bring in the content.

But then displaying the scraped data and allowing it to be posted would depend on how your app and posting interface is setup.

Someone else may have a more informed answer and an idea of what plugins or API’s to use


Geoff | Wolfer Tech
Creator of The Best Selling Bubble Template
Creator of The Most Used Bubble Template (FREE)

Cheers Geoff. Once I know how to collect the data, and what it’s termed as, I doubt displaying it will be a problem.

I know nothing about APIs other than what they are, so I will keep researching and learning. It’s probably fairly simple for a developer/coder.

Hi @andmilne,

I just published a plugin for this: https://bubble.io/plugin/link-preview-1490419628548x723854579525484500

You just need to get an API key from the service (linkpreview.net) and put it into the plugin settings, and you’re good to go! Check out the plugin link above though for some more instructions on how to use it if you’re still new to Bubble.

I’ve also created a sample in the forum app so that you (and others) can study. Enjoy and let me know if you have any questions!

Sample Page Preview: https://forumapp3.bubbleapps.io/version-test/link_previews
Sample Page Editor: https://bubble.io/page?type=page&name=link_previews&id=forumapp3&tab=tabs-1


Gaby | Coaching Bubble

12 Likes

That’s really cool, thanks Gaby :slight_smile:

1 Like

Hi Gaby - fantastic. Thanks so much. Makes a real difference,

2 Likes

Hi @romanmg and everyone else, sorry to revive this old post, but I think there seems to be a problem with the Sample Page Editor and Preview…!

I’m still quite confused about how to use link preview, and this would have been super useful…

If this isn’t an issue, then I’m even more confused than I thought ahahah.

Many thanks in advance!

1 - Get the LinkPreview plugin (which I assume you have)
2 - Get a key and insert it into the plugin

Then, simplest way to learn how it works…

3 - Create a thing (call it Article or something).
4 - Within that thing, have 4 fields… Image, Link, Title, Body
5 - Create a group on the page. In that group insert an image, a link and two text boxes. Set the source to 'do a search for Articles, sort by date descending yes, :first item) Make the image the sources image, the link the sources link, and the texts the sources title and body)
6 - Add an input box set to text
7 - Create a workflow… When the input box value is changed, create a new Article

  • Image = (Get Data from an external API… Provider = Link Preview - Get Preview)
  • path = your input box’s value’s description
    8 - Repeat for Image, Link and Title
    9 - Test by pasting a url into the input box and pressing enter

After that, you can obviously play around with exactly how you want the link to render.

8 Likes

This is fantastic - thanks so much!!

Hi Gaby @romanmg

I discovered that the link preview image is sometimes “wrong” and often not the same as when you would post the link on fb or linked in. Would you know anything about this? (Also, in fb you can select which image you want to display if there are multiple.)

Many thanks,
Gaudenz

Edit: The following link for example does not return a preview image: https://www.theguardian.com/world/2020/jun/17/pandemics-destruction-nature-un-who-legislation-trade-green-recovery

1 Like

@andmilne, @romanmg
Hi, guys! What is my problem?


I am not on a paid plan. Is it a problem?

I think that your sample editor is not okay right now. Unfortunately, it is public and editable and someone spoiled it.

UPDATE: if someone faces the same problem, then go to the app history and restore previous versions.

Mine works fine. Don’t think it is anything to do with being a paid plan or not.

Hey guys, is there an ability to get a video for a preview?

@romanmg, can you help me? I have a feature, where a user can upload an image manually or insert a link to get link’s image via your plugin. My problem is that I can’t use your plugin for conditions. As you can see on the screenshot, I can’t hide text behind the image that I got from the link

Commenting because I’m facing this problem as well. @romanmg Is there a way to have the link preview select a particular image if there is a logo, content, and text? Thank you!

I can’t figure out where I am supposed to insert the key in the plugin.

Hey guys, likely she wont be updating her plugin. She works on a ton of other projects and is barely around here on the forum.

If you look in their documentation, if you just used the API connector, and copy & paste the CURL request into your API call, you can literally just make your own. No need to use the plugin.