Does anyone know of an existing module that resembles Facebook's "Share Link" (or in the older version - "Post Item") widget?

Basically, a user can submit any URL and the module can nicely format the title and "teaser" (text and image) content from the URL. There's basically a lot of room for customization...

The "posted item" can then be part of a feed.

Any suggestions or pointers would be appreciated!

Comments

ridefree’s picture

drives me nuts how clients often describe what they want by the way facebook works :)
tho i find myself doing it too....

i would love to be able to have a way to post a link and then have the image/vid and short summary pop up ... if you figure it out let me know ,...

makes me also think that there might be a great set of documents written in the docs section titled:

Can you make it like Facebook?
and list all the different modules/recipes/snippets etc that are useful when you ultimately get those questions :)

spiffyd’s picture

Can you make it like Facebook?

That's beyond what I'm asking, but here's a piece of the puzzle for you: http://drupal.org/project/fbstatus The module is even named after FB! :)

Blueeeeie’s picture

Actually, I was wondering how does it work on the backend side?

When a URL is submitted, how does the code process it such that a title, image and content is pulled out from the webpage itself?
I noticed that they do it for Kaboodle's product submission too.

---
www.drupaldiy.com - Showcase your Drupal site

spiffyd’s picture

I'm curious for the answer to Blueeeeie's question as well. As more of a designer, I wouldn't know how to answer that question. :\

Blueeeeie’s picture

Did some research over the last couple of days and found out that its called screen scraping.. By inputing the URL of the webpage, the php code would search for certain content from the HTML source of the page and return the values it "scraped".

Came across this article that SORTA does that but they didn't really elaborate on the coding or how its done. Will be exploring a bit further and experimenting with some php code..

Perhaps this could be my first module project.. heehee

---
www.drupaldiy.com - Showcase your Drupal site

guldi’s picture

hey

are you sure you need a module to do that?

i think facebook does it for you:

eg: http://www.facebook.com/share.php?u=http://drupal.org/node/296465
or with pics: http://www.facebook.com/share.php?u=http://edition.cnn.com/2009/US/02/10...

i doubt you can do it better... :)

spiffyd’s picture

why a module? because those are only used thru facebook. what if i want to do something similar on my own website?

Sinan Erdem’s picture

Nice, but I would also like to put a small button like "share it on Facebook" to each node. Is it possible? Any suggestions?

Cheers,

Sinan

Sinan Erdem’s picture

paganwinter’s picture

There are multiple ways of doing this in PHP.

Read up on cURL for PHP.
An alternate would be file_get_contents("www.example.com")
Then you could use XPath or just plain old RegEx to fetch specific parts of the web page.

OK, I myself haven't tried it out yet, but surely it'd not be that difficult to implement.
But integrating the whole thing with Drupal (CCK?) that is a whole different monster...

crotown’s picture

There are some similar requests out there at http://drupal.org/node/500414 and http://drupal.org/node/402504.

In answer to http://drupal.org/node/519558 I am developing a new 6.x module to handle this. It should be a contrib module soon -- I will post a link to the project when it is contributed.

-Steve Cronen-Townsend
www.crotown.com

kobnim’s picture

Steve,
If you have the time, it would be great to see a description of what your bookmarklet module will do.
Thanks!

crotown’s picture

My funding for this project fell through, so right now the project is in stasis pending someone wanting to fund it. At the moment it is a custom CCK field that combines a link field (link module), an imagefield, and a text caption, and the code is private.

willsteinmetz’s picture

I recently added a TweetMeme module: http://drupal.org/project/tweetmeme that adds a nice button that says "retweet" and gives a count of how many times it has been retweeted. I've see on other sites nearly the same thing but for Facebook and have yet to find a Drupal module to do it.

I'm pretty new with module development but would love to take a stab at it. The one problem I've run into so far is trying to figure out where it pulls the number of shares on Facebook from. Is there a Facebook share meme somewhere that I happened to miss or something?

If anyone has helpful links on this and is willing to share, that would be great.

willsteinmetz’s picture

After posting about needing more info, I found a bit of useful info for creating a share button. I need to do a bit more research before starting writing the module, but hopefully within the next few weeks I can take a stab at it.

I will post a link here when I get a dev version working.

willsteinmetz’s picture

I've got a test version that I have been working on for the past few days.

It can be viewed here: http://hot4headers.com/ I will hopefully be going through the process of posting it on the modules section this week so that others can use it. Once it gets approved and posted, I will post a link back here for it.

HowardLake’s picture

Yes, that's just the kind of Share on Facebook button/icon that I could use, and nicely placed by the Tweetmeme button. It gets you close to the Mashable.com approach.

I noticed however that the Facebook link only pulls in the title and link - it doesn't pull in the image for each item or the intro text. Are you planning to get those included in your module's functions?

HowardLake’s picture

Yes, that's just the kind of Share on Facebook button/icon that I could use, and nicely placed by the Tweetmeme button. It gets you close to the Mashable.com approach.

I noticed however that the Facebook link only pulls in the title and link - it doesn't pull in the image for each item or the intro text. Are you planning to get those included in your module's functions?

willsteinmetz’s picture

I've noticed that sometimes it can grab the image from the node. That's a Facebook API thing and not anything I can control.

Also, I'm sure you'll notice if you implement the module and click the share button, the count won't appear (if you have one of the button types with the count selected) until there are at least 3 shares. I have no idea why Facebook decided to do this, but for some [stupid] reason they did.

willsteinmetz’s picture

The Facebook Share module is now out on the Drupal module repository: http://drupal.org/project/facebookshare

designguru’s picture

In the event that you've come across this thread looking for information on how to put a Facebook 'Like' (instead of 'Share') widget on your nodes, check out these instructions I just posted on WhyDrupal:

http://whydrupal.com/blog/7610/adding-facebook-widget-your-drupal-site

q./

Qasim Virjee
Principal, http://designguru.org
qasim@designguru.org
1.416.777-1864

paganwinter’s picture

almarma’s picture

I'm trying this module right now as I want to create a website where the content is created from links found elsewhere. I mean, each user find useful links on the web, and comes to my website and share it the easiest way. I found that, with Micropublisher, I can create content from a link, getting images, but it's not a node, so I cannot work with them as nodes. Quite difficult.

But today I found another module that looks very promising: http://drupal.org/project/bookmarklet

This module looks amazing, but for now it's under development. Also, I didn't found a way to scrap images from the destination links :(

gomino’s picture

I am trying to do the same exact thing but I cannot find a module that does this.

I am sure that there is a lot of people wanting to create a social bookmarking website (or derivated from it).

shaneonabike’s picture

Did anyone find a solution to this in the end? Would be awesome to find something that isn't sending a link to Facebook but actually doing it's own open-source scrapping?

elimuir’s picture

I have created a website for a client at http://wallofcool.synapse.com that does much of what you describe. I have built a module that will retrieve the images from a url just like the Facebook feature. It can also pull in real-time screenshot images.

A descriptive demo of this site and the module can be found in the following video. The module retrieving images is highlighted at the 10:00 minute mark.
http://vimeo.com/7816575

I am within a couple days of releasing this module to drupal.org and will post a link to it here.

ashernor’s picture

Hope you didn't encouter any problems with your module.

I hope to hear from you soon.

Thanks.

elimuir’s picture

I have finally released my module for public use. Please note this module is only designed to retrieve images from urls found in form fields while adding or editing a content type.

http://www.drupal.org/project/imagefetchr

Feedback is always welcome.

rezatam’s picture

can i edit it to manully show the picture from url??