• by mcint on 9/1/2024, 9:36:22 PM

    Well done! Nice to play with. Seeing it in context of each platform's default interface is *chefs kiss* a nice touch.

    - It sounds like meta-crawlers for each platform might behave differently, and I noticed previews don't match what I see elsewhere, 0/2 in the 2 I know well, WhatsApp & Discord.

    - It would be good to report redirects that happen in link following.

    - Needs target url in URL query params or fragment.

    https://linkpreview.xyz/#example.com

    https://linkpreview.xyz/#url=https://example.com

    https://linkpreview.xyz/?url=https://example.com

    Without data specifiable in URL it's a cute tool on a web page, whereas with data controlled by URL it's a native, shareable web utility. Just as cool URLs don't change, on the web URLs are the API.

    (Updated after seeing your tweet, https://x.com/fayazara/status/1830272619637047359 [top HN]+ [all critique]!)

  • by FinnKuhn on 9/1/2024, 1:43:08 PM

    Great little tool, but please don't force me to type https:// and just add it automatically when I type something like example.com

  • by matteason on 9/1/2024, 3:35:27 PM

    Neat tool. A couple of suggestions:

    I'd make it fetch the meta tags and image using the user agent string of the services you're showing previews for. For example, Twitter/X fetches meta tags with a user agent string of Twitterbot/1.0. Some sites may serve different content to different services in order to optimise the image for display on that service.

    It also looks like your API may not be looking at Twitter-specific meta tags [0], as it just returns one set of metadata that's used by every preview. For example on https://govukvue.org I use the 'summary' card format, which shows a small image with the name and description beside it. But your tool renders it as if it's a 'summary_large_image'.

    [0] https://developer.x.com/en/docs/x-for-websites/cards/overvie...

  • by vinnymac on 9/1/2024, 2:45:02 PM

    Does not appear to handle open graph correctly. For example, it displayed pixelated favicons resized to fit their containers, rather than the `og:image` in the head tag.

  • by franciscop on 9/1/2024, 3:51:06 PM

    I usually use https://socialsharepreview.com/ but there are many, so I'm curios on how is this different/better and/or why did you decide to make it instead of using existing solutions?

  • by DitheringIdiot on 9/1/2024, 6:55:29 PM

    I built the opposite of this tool. It lets you generate a page to check which meta tags will generate a preview on a given platform.

    https://getoutofmyhead.dev/link-preview-tester/

  • by pino82 on 9/2/2024, 2:12:12 AM

    I'm still dreaming about days when I can just write my website against the standarda and test it with my browser and then be happy if it works, because it will of course work in all other browsers too.

    And now there is a tool where you can manually check how a ton of proprietary chat tools render some previews for your page.

    And everyone gets mad as if that's the greatest thing since paper was invented.

    Not in a forum of funny media guys, but at HN.

    Interesting times...

  • by dbg31415 on 9/1/2024, 2:54:32 PM

    Why this tool over https://socialsharepreview.com/ or https://www.opengraph.xyz/ or https://socialmediasharepreview.com/ ?

    Feedback...

    You're failing on URLs that don't have HTTPS... that's awkward. I should be able to type any site and have it be smart enough to go to the URL and scan against the resolved URL. Like type in "blizzard.com" and have it load "https://www.blizzard.com/en-us/" for me.

    Nice to see Discord and WhatsApp I guess, but what about LinkedIn, what about Pinterest. Or Slack (should be the same as Discord).

    You don't include what to fix. Check out how socialsharepreview.com does it.

    https://socialsharepreview.com/?url=https%3A%2F%2Fnews.ycomb...

    https://i.imgur.com/LDXNYYR.png

    It has a bunch of helpful tips on what to fix to make your content unfurl correctly. Really useful for the marketing crowd that loves this stuff. These sites all use different formats, different character counts... It's good to share information about what to fix. Twitter cards, vs. Open Graph metadata, for example. (I didn't check but it'd be good to make sure you're loading the right ones for the right site.)

  • by kilian on 9/1/2024, 2:54:18 PM

    That's pretty cool! Get ready to keep these up to date monthly or become obsolete quickly.

    One of the downsides of tools like this is that your URL needs to be available online so if there's an issue, your iteration loop is quite long.

    In Polypane [1] I've built social media previews that work with any local URL but also let you overwrite that URL for the social media that display those. I built (and frequently maintain) previews for X/Twitter, Facebook, Slack, LinkedIn, Discord, Mastodon, Discord, Google Search, Bluesky, Mastodon and Threads. For all of those I have the design for their light and dark mode so you really can test everything. It also tells you what's missing and what is incompatible. Check it out: https://polypane.app/social-media-previews/

    [1] https://polypane.app/

  • by shinryuu on 9/1/2024, 2:06:16 PM

    Missing linkedin and also missing mastodon. Neat tool! If the page is missing something it would be helpful with some text on how to improve such as what should be done.

  • by holistio on 9/1/2024, 3:25:53 PM

    This is half-baked for now.

    For a lot of SPA, we generate OpenGraph images if the user-agent matches a certain pattern, e.g. if it's Facebook, Discord, Twitter, etc. making a request.

    If you're not mimicking the user agents of the platforms, it will often not be the same result.

  • by pimlottc on 9/1/2024, 5:02:42 PM

    How do I know this is accurate? Does it actual use tools/APIs provided by the social media sites to generate the preview or does it just re-implement the same HTML based on observation (and therefore require constant updates to keep it in sync)?

  • by adithyassekhar on 9/1/2024, 3:17:19 PM

    The WhatsApp preview is not accurate at all compared to my Android. Is this designed around how it would look on iphones?

  • by dmje on 9/1/2024, 2:34:29 PM

  • by seagullriffic on 9/2/2024, 9:18:33 AM

    The LinkedIn preview text made me laugh, thank you :)

  • by renegat0x0 on 9/1/2024, 5:36:04 PM

    I often use my app to see what kind of properties page provides:

    https://github.com/rumca-js/Django-link-archive/blob/main/sc...

    It can display open graph, RSS, YouTube props

    It is a selfhostable app mostly for RSS reading

  • by Brajeshwar on 9/1/2024, 3:06:46 PM

    This got me thinking and if I can ask something. If I do not care about how/what comes up when people share, for my personal website, should I care about any of these OG/Twitter/etc?

    Do you just ignore and move on (I mean from these meta tags and the like -- not this particular tool)?

  • by reporter7 on 9/2/2024, 1:28:36 PM

    > failed to fetch meta tags

    See this a lot. So you're seeing the same problem I am in my side projects -- Cloudflare, Fastly, etc must have an anti-abuse / anti-AI scraping setting and it's causing 403 errors when they detect you're not a legitimate client. They're whitelisting IP ranges of major social media servers though because it will get the link preview from Telegram, iMessage, etc.

    Try it yourself with links to fastcompany.com or kickstarter.

  • by breck on 9/1/2024, 4:35:52 PM

    Oh wow, I need this! I make a static site generator and making sure my users' contents appear well on social media sharing is very important. You already helped me find a few bugs. Thank you.

    Here's my user test: https://www.loom.com/share/b7cb729ed84b407d95ee764ab60c7dd3?...

  • by izakfr on 9/1/2024, 3:09:40 PM

    This is really awesome, I’ve been looking for this exact tool. Putting the preview in the context of a real message / post makes it more useful.

  • by nojs on 9/2/2024, 3:52:33 AM

    Its worth noting that Google regularly rewrites title tags, so that part is probably not accurate.

    https://developers.google.com/search/blog/2021/08/update-to-...

  • by iJohnDoe on 9/2/2024, 1:32:26 AM

    Very helpful. Great job!

    The X preview seems to crop on the left for a couple sites I tried. Not sure if that is accurate or not. Those sites look good in the other previews. I tend to use iMessage as a test and they look okay there, which I believe uses the X/Twitter tags.

  • by wlonkly on 9/1/2024, 10:50:52 PM

    Oh, this is nice! I would love to see a Slack unfurl sample. I don't entirely understand why Slack unfurls are unpredictable sometimes, but for example, an Instagram reel link unfurls just fine on Twitter or Facebook, but has no unfurl at all on Slack.

  • by johnchristopher on 9/1/2024, 8:12:55 PM

    It's interesting that you are adding the cruft around each preview (e.g.: the facebook comment form, etc.).

    That's what differentiate from https://opengraph.dev/ that I use regularly.

  • by audiala on 9/1/2024, 7:24:05 PM

    Thanks, I like the design of your site better than the other alternatives I found and it came exactly when I needed it. As other have mentioned, a way to run it locally would be great to not have to deploy live or create a tunnel in order to test it.

  • by Scotrix on 9/1/2024, 10:17:49 PM

    very nice!

    I built a service (https://yasl.at) which allows to generate short url with customised meta data via a simple API to deep-link into web games and specifically results/things worthwhile to share without having the headache of tampering in each game over and over again.

    You can read more about one of my use-cases specifically here: https://medium.com/@degola/supercharge-your-links-with-custo...

    Open to do some backlinking @fayazara?

  • by lylo on 9/1/2024, 5:03:58 PM

    I’ve been using the Banner Bear one for years. Works for me!

    https://www.bannerbear.com/tools/twitter-card-preview-tool/

  • by cloudking on 9/1/2024, 3:57:49 PM

    I just use the official Meta one, although it requires a login: https://www.facebook.com/tools/debug/

  • by ebloom19 on 9/2/2024, 2:32:54 AM

    Neat little tool! It helped me figure out my websites logo is getting cropped on some socials. Making it easy to see how I need to modify it to fix the issue.

  • by moonleay on 9/1/2024, 1:59:11 PM

    Cool idea, though it seems like it still requires some polish. There are small issues, for example: the design of HN links on Discord does not seem to be correct.

  • by valbis on 9/1/2024, 1:58:55 PM

    straight to the point without any fuss. well done

  • by steelcm on 9/2/2024, 10:30:06 AM

    Looks good, but doesn't implement video previews, which seems to be the case with most of these OG preview tools.

  • by hoherd on 9/1/2024, 3:10:17 PM

    Currently this appears to not handle quotes in titles properly, rendering them as ' instead of an ascii quote.

  • by piyushtechsavy on 9/2/2024, 7:38:19 AM

    Very interesting tool, usually developers check everything by posting links on these platforms.

  • by dorpstein on 9/1/2024, 3:41:03 PM

    This is really cool. I’m shipping a side project soon and this made me rethink the preview.

  • by dheera on 9/2/2024, 1:07:27 AM

    I wish all thase sites that blast me with GDPR, newsletter, unsolicited chatbot, and 5 other popups could see that if on a mobile device the whole website us covered up in shit I have to deal with, I lose interest in the site and bounce

  • by gejose on 9/1/2024, 2:41:30 PM

    Please change the text input to not autocorrect words.

    Great tool!

  • by fayazara on 9/2/2024, 7:21:49 AM

    Linkedin and Telegram previews now available

  • by sh4jid on 9/1/2024, 2:07:37 PM

    It's amazing! Thanks for sharing.

  • by Jackson__ on 9/1/2024, 3:21:45 PM

    This will be very useful for the half-decade we might have left until links to anything except the top 5 sites are auto-filtered.

  • by celtictechie on 9/3/2024, 1:14:51 PM

    you've reminded my how old is my banner image... solid work, thanks!

  • by anonymousd3vil on 9/2/2024, 4:33:07 PM

    This is some good stuff!

  • by aitchnyu on 9/2/2024, 12:52:41 PM

    It breaks on Firefox.

  • by darkbatman on 9/1/2024, 1:45:32 PM

    I tried google.com. It says invalid url. looks half baked. can you not force to write protocol.