I’m trying to add a functionality for a webapp where when users post links, the title picture URL is fetched somehow, so that it can be displayed on my web app.
Facebook does this already; when you share a link it fetches this information and displays the title, a blurb, a picture etc.
I know that it identifies the pertinent data as such:
<meta name="title" content="title" />
<meta name="description" content="description " />
<link rel="image_src" href="thumbnail_image" />
But how could I it actually fetch these strings?
I’m programming in Ruby on Rails, so an answer compatible with that, or using javascript perhaps, would be most useful!
There’s a gem that wraps OpenGraph, which is what Facebook uses. Seems its been idle for a year or so.
https://github.com/intridea/opengraph