Possible? Facebook's "Share Link/Post Item" Module

spiffyd - August 17, 2008 - 19:36

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!

:)

ridefree - August 19, 2008 - 15:28

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 :)

Hah

spiffyd - August 19, 2008 - 20:32

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! :)

How does it work?

Blueeeeie - December 28, 2008 - 11:02

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

I'm curious for the answer

spiffyd - December 29, 2008 - 00:28

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. :\

They call it screen scraping

Blueeeeie - December 29, 2008 - 08:20

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

why a module?

guldi - February 11, 2009 - 09:18

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... :)

why a module? because those

spiffyd - February 11, 2009 - 22:31

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

"share it on Facebook"

etcetera9 - June 22, 2009 - 13:16

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

modules

etcetera9 - June 22, 2009 - 14:48

Yes...

paganwinter - December 3, 2009 - 11:17

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...

development underway

crotown - July 21, 2009 - 19:12

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

Steve Cronen-Townsend
Cronen-Townsend Consulting
crotown.com>

module description

kobnim - August 7, 2009 - 01:41

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

 
 

Drupal is a registered trademark of Dries Buytaert.