Forum: Ruby on Rails How does facebook’s Share a link feature work?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Aee8d3cad242904d71174994a265aafd?d=identicon&s=25 Ahmed Sobhi (humanzz)
on 2009-01-28 16:10
I wanted to implement that feature in a Rails application I'm buidling.
A user posts a url, and voila, he gets a better representation for that
url.

I already dealt with a similar feature before where the requirement was
to replace a given url with the page's title and favicon.

Facebook go beyond that and if it's youtube it gives you an embed object
and so on. I asked the same question on stackoverflow
http://stackoverflow.com/questions/477899/how-does...
where I was introduced to oEmbed and oohEmbed. I guess they are great.

What I want exactly is
1. A user attaches a url with his blog post for example
2. when showing that blog post, one of the following things should
happen
a) If youtube and other video sites, embed that video in its proper
player
b) if an image, show the thumbnail
c) else, show a page's title and description

I wanted to know what ideas come to your mind if you were faced with
implementing such a feature. One thing to mention is that this feature
will be used in my application heavily, or should I say all the time so
the solution should really pay much attention to performance.
This topic is locked and can not be replied to.