What's best way to grab link data?

I’ve noticed there are a few plugins that grab from links, but I’m unclear which can grab the basic ograph data such as:

  • Title
  • Source
  • Featured Image
  • Description

What’s the cleanest and simplest way to do this from a link currently?

Thank you!

Hey @jasonwojo :slight_smile: @romanmg’s awesome Link preview plugin is the way to go on this!

You’ll need an API key from here:

Then you can download the Link Preview plugin in your Bubble app, and paste in your API key.

On your page, you can have an input element where Users can paste a link. Then display that information dynamically with text and image elements using “Get Data From an External API → Link Preview”, and change the path to the Input Enter Link’s value. So it could be:

That should do it!

5 Likes

Awesome, I knew there was something, but wasn’t quite sure just yet.

Thank you!

1 Like

Hi Faye,

@romanmg’s plugin is exactly what I’m looking for!

Only thing, the ‘(path) q’ doesn’t show my Input field - any idea where this would have gone?

Thanks so much, this plugin is epic!

Input

1 Like

Ok, so I solved it as soon as I looked at @romanmg’s Plugin page (https://bubble.io/plugin/link-preview-1490419628548x723854579525484500)

  1. Get a free API key at http://www.linkpreview.net/ and add them to this plugin’s settings.

  2. Set up your link preview with an image element and text elements to display the site’s image, title, and description.

  3. Set the dynamic data for these elements to “Get data from external API” > Link Preview - Get Preview

  4. You’ll see a dynamic field for the URL. This can be the value of an input on the page where your users can type in a URL. Or this can be the value of a saved URL in your database like a user’s personal website.

So you don’t need to create workflows to save the data or anything - just create the text and image elements you want to populate with the preview data and then your Dynamic Data will be “Get data from External API” and then select ‘Link Preview’. And for the path, just use a Dynamic text input (eg where your User enters the address they want the preview for) or data saved in the database (eg Current User’s Website Address) and the preview pulls through the preview data live.

This plugin is the &%$#! :smiley:

2 Likes

Have you actually managed to grab any links properly?

I’ve installed the plugin, built the group with the image and text elements, but the most it grabs is the main URL’s info, never all the correct article data from the news site for example.

I did :slight_smile:

It worked very well in the end. Are you using the news site’s homepage URL? Or the story’s specific URL?