Does anybody know of a method of duplicating (or achieving substantially similar results to) the way Facebook allows you to enter a URL in a field and it automatically pulls in the page title/info/picture? I'm thinking ideally it would be something like a CCK field for the URL and then a few fields that can't be edited which get populated by the result of a query to the URL that was entered.

I wanted to include this type of functionality on a site I'm brainstorming right now, as a "Further resources" kind of area at the bottom of the page, with links to off-site URLs (and ideally with info pulled automatically from those pages).

Any help is appreciated, I haven't found much on my own.

Comments

laryn’s picture

FYI in case anyone finds this post in the future: I'm not sure about implementing the AJAXy aspects of the Facebook functionality, but this project could be a major part of my solution. Will have to do further testing as time allows:

http://drupal.org/project/computed_field

Computed Field is a very powerful CCK field module that lets you add a custom "computed fields" to your content types. These computed fields are populated with values that you define via PHP code.

pribeh’s picture

I'm also uber interested in seeing such a feature become a reality within Drupal. I'm not too sure how to go about implementing this but computed_field does seem like the choice - I only noticed it just the other day. The most difficult part is how to handle images. I assume, for instance, that what we want to do is pull any image from the page into an imagefield and then resize it via an imagecache preset.

pribeh’s picture

I've begun helping the development of such a module. I will update this thread as soon as progress is made or we get the module up on Drupal.org.

pribeh’s picture

Just to let everyone here know: a module of the the desired result described here is in development and will hopefully be released on Drupal.org very soon. The said module (which is feature-complete) functions as a submodule for the tremendously powerful Facebook Style Status module (http://drupal.org/project/facebook_status) and also integrates with the amazing Activity 2.x module.

krisvannest’s picture

definitely interested

polishyourimage’s picture

vertazzar’s picture

subscribe
- btw i didnt find any module that can do that

jaochoo’s picture

I am also interested in such feature. At best it should be possible to integrate with existing Facebook-like wall and status modules, e.g. you can post links on a user's wall or as your status-update and the module automatically pulls some meta-information of the link's target site and a collection of thumbnails.
Additionally, posting pictures and YouTube videos to a Facebook-like wall or status.

I would greatly appreciate if someone is capable of developing such module!

summit’s picture

Subscribing. Very much interested in this functionality. Would love sort of cck nodeinfo which would hold this info. May be extention of cck link?
Greetings, Martijn

vertazzar’s picture

also all of you people you might want to see this module http://drupal.org/project/querypath and other RDF modules which do very similar stuff that facebook composer box does, and digg. But yea, not so specific - in fact those RDF modules can be used to adopt some code and to see how the "Fetching data" works.

liliplanet’s picture

subscribe, thx!

ccleveland’s picture

subscribe

rabkhan’s picture

Do u want to provide this functionality to other users of the website or is it going to be only u using it? If its you then u might as well enter that info yourself coz developing such a module must be very difficult since it would require a thorough knowledge of AJAX.

summit’s picture

Off course, usage of this to-be module would be for users! Greetings, Martijn

pribeh’s picture

Facebook Link (as it will probably be known on Drupal) should hopefully be posted on Drupal.org in the next coming week. I know a lot of people have been very patient. Like I said, it is a submodule of the popular Facebook Style Status Module (http://drupal.org/project/facebook_status). For all those interested, it's working and in action on the website www.LondonFuse.ca. It's free to make an account and test out the feature if anyone is interested.

jaochoo’s picture

Thanks for the info. As you are not the maintainer of the FBSS module, let me kindly ask if you are sure about that it "should hopefully be posted (...) in the next coming week." I just wanna make sure ;-)

Furthermore, is the LondonFuse.ca site from you? It looks great I would have some questions to ask.. // edit: I just tried the link-field on LondonFuse.ca. I entered "www.google.com" and got an error "Invalid URL". Entering "http://www.google.com" worked, so you (or whoever is running the website) might consider fixing that so it works without a mandatory "Http://" in front.

pribeh’s picture

Hi jaochoo,

FBL will be posted as a separate module (with FBSS as a requirement) by the maintainer (publicmind). I am the lead techie behind londonfuse.ca. If you have any questions pertaining to that feel free to contact me. Thanks for pointing out the http error as my test users didn't seem to report it. I can easily see many users omitting http:// in future use. You should definitely file that in the issue queue once the module appears on Drupal.org :)

I'll update this thread as soon as that happens.

michelle’s picture

Do the user pages work in Opera? Since you said it was ok to make a test account, I did. My user page partially loads and then just spins.

I'm looking forward to this feature as well. I know IceCreamYou had long term plans for it and didn't realize someone else had taken over the project. I guess I'm out of the loop. :)

Michelle

pribeh’s picture

Hmm, that's very interesting Michelle. I will look into that immediately. I've never tested the site in Opera unfortunately. Please try FF/IE/Safari and it should work fine. Contact me if you have any further issues as i would greatly appreciate any bug reports.

I've actually sent the module to Ice and he'll be looking at it. Hopefully he'll have some good suggestions as to how to improve the module. I think publicmind has done an excellent job developing it. He's done excellent work on similar projects such as feeds_imagegrabber.

michelle’s picture

Well, the page comes up in Firefox but it's confusing. I'm on http://www.londonfuse.ca/user/michelle and there's a picture of some dude named "Thomas Cermak" in the upper right. It's not very clear why there's a picture of someone else on my profile page. Or isn't that supposed to be part of the page?

Michelle

pribeh’s picture

Hi Michelle,

Are you sure there's a picture of me (I'm Thomas) in the upper right corner or in the box labeled "Followers"? There could be if I'm following (via the flag module) your user. There should be a default avatar picture (of a deer :) the top right corner next to some links of your username, inbox link, etc. You can read this tutorial for more information: http://www.londonfuse.ca/blog/fuse-20-now-one-hundred-percent-more-fuse

The FBS status box should be to the left, with all the user create links. The link box sits below the status box. It's modeled after Facebook a little that bit obviously.

Anyway, if there's a picture of me in the very upper right corner that's one bad bug so please let me know if this is indeed the case.

michelle’s picture

It's a deer now... I closed the tab so can't take a screenshot of how it looked. It was definitely in the upper right where the deer is now. Do you have block caching on maybe?

Edit: Actually, the whole thing has changed. There was a whole stream of stuff on the page as well before. It looks like maybe the entire page was cached.

Michelle

pribeh’s picture

Hi Michelle,

Ya, that's really interesting. You would have been viewing my profile page (with all my content, the user's content I'm following, etc.). Thanks for reporting this. I have Panels cache, views cache and page cache turned on. I think there's some funny stuff going on there. I'll try to find a paradigm for caching and stick with that.

michelle’s picture

If it helps, it happened immediately after I logged in under Firefox when before I had logged in under Opera. I just tried logging out and in again and no problems. Maybe just a weird one time glitch? I'm positive it happened, though. I double checked the URL and I was on my account page with your stuff.

Michelle

icecreamyou’s picture

Hi all, I'm the maintainer of the Facebook-style Statuses module (FBSS).

I'd just like to reinforce that current efforts to implement this feature are focused on the impending facebook_link module. I am planning to review the module as soon as possible, but in the mean time it seems to work nicely on pribeh's website.

In the long term, FBSS 3.x (which probably won't be started until at least May) will include a pluggable architecture that allows attaching anything to statuses -- links, images, video, and other media included, much like Facebook's publisher. At that point I facebook_link will probably evolve into a plugin for that new architecture, and I will make sure there is an upgrade path if anything changes.

summit’s picture

Hi,
it is working great! Looking forward to the module, see:
http://www.londonfuse.ca/user/summit

Two remarks though..
- please put http:// already in the linkfield. Gives better directions :)
- can the output be put in every nodetype, also the weblinks type? which is build for links?

Great module!

greetings,
Martijn

publicmind’s picture

Hi Ice,

That would be great. I had a little chat with pribeh yesterday, we decided that it would be great to develop a pluggable system where we can then write plugins for to add these services. I am happy to see that you think the same.

I had a few issues while I was developing facebook link, specifically integrating FBL form with FBSS, as I did not want to disable the AHAH refresh as you suggested. The view below the status form still isn't refreshed on AHAH submit of the Link. Anyway, I am hoping if you can make a few changes to FBSS, so that FBL fits in more smoothly.

Regards,

icecreamyou’s picture

I just responded to an email from pribeh -- I'll be AFK for the weekend but I'll be back Sunday night and I would love to chat in more detail about this.

summit’s picture

Very much looking forward to this module, any progress to report please?
Thanks a lot in advance for your reply!
Greetings, Martijn

pribeh’s picture

I promise to post an update here as soon as its in CVS.

blogrush.net’s picture

subscribing..

btw: why use the name of the website you are trying to emulate in the modules name, if you were to choose something more generic for the name you might avoid any future legal pressure from them.

icecreamyou’s picture

I have had lawyers look into the legal implications, and they have concluded that the use is completely legal. This discussion has been had before and I'm not going to go into the specific reasons again.

publicmind’s picture

I just released the 1.0 of Facebook-style Links.

Have a look and let us know what you think...

pribeh’s picture

gomino’s picture

How can you make it work as a CCK field?

I am eager to create a new module.

pribeh’s picture

Hi gomino,

There is currently no support for links as a CCK field since Facebook-style Statuses (what FBSL augments) are meant to be light-weight and, hence, so are there attachments. There are a number of module combinations/configurations that could get you what you desire though.

Also, for anyone checking this thread, FBSL has no been depreciated in favour of Facebook-style Publisher Module which now allows for more than link attachments. FBSMP (http://drupal.org/project/fbsmp) allows for link, photo and video attachments. Other attachments will hopefully make their way into the module in the future.

gomino’s picture

Hi pribeh,

Thank you for your answer. I have been searching for many hours but I have not found a combination of modules to do what we are talking about.

So far I have found these modules, but as I said, they do not get us anywhere except to some help creating a new CCK content type module:
http://drupal.org/project/computed_field
http://drupal.org/project/linkimagefield
http://drupal.org/project/weblinks
http://drupal.org/project/fbsmp
http://drupal.org/project/bookmarklet
(maybe I am leaving 1 or 2 more modules behind)

I also have found that http://www.iliketotallyloveit.com are implementing this idea but they have not released their module yet (if they release it). The name they have given to this module is "Scrape submit". I have tried it on their webpage but it does not work for me. I get an error, that is why I know how they called their module.

There was also a year ago a bounty for this thing which you can see here: http://drupal.org/node/519558
but it looks like it did not go anywhere either.

There are also some other posts talking about this needed module but none of them gives good answers, like this one: http://drupal.org/node/500414

If I do not find anything I will be making this module but I am a total noob in drupal programming so it will take me long. Since all the functionality is already done in fbsmp I hope it won't be too long.

fbsmp limits the links and image posting to your status. What we need is a CCK content type that given the URL gets you the images so you can choose. Maybe scrap the title as well and the meta information, but that is trivial if the images part is done.

Thank you for your help.

gomino

icecreamyou’s picture

  • iliketotallyloveit.com is not using nodes for whatever they're doing, and what they're doing doesn't look similar to FBSMP to me.
  • FBSS (which FBSMP is based on) does not, and will never, use nodes.* Asking for node integration is like asking Drupal to use Joomla. However you are misguided about wanting to use CCK. There are no advantages to using CCK in this case, and doing so would be significantly slower. FBSS and FBSMP can do everything you should need, and if they don't it's probably in development already. FBSS in particular is extremely stable and feature-complete, and it would take ages to write another module that could come close to that polish. Other modules (most significantly Microblog) have tried to do this in the past with nodes with very limited success.
  • FBSMP does do scraping (and everything else mentioned on this page). When you give it a URL it collects images, metadata, and the page title from that address.

I encourage you not to decide the way you want something to be done before you find a solution that solves your problem. For example in this case CCK is not the best solution, but there is another solution (FBSMP) that does everything you need.

* Technically, someone else could make a module that syncs status updates and FBSMP attachments with nodes, if you really, absolutely need to be using nodes (although there's absolutely no reason why that should be necessary). That's an approach I would recommend over starting an entirely new module that attempts to duplicate FBSS/FBSMP, but it would still be extremely complex and slow. There are no benefits from using nodes. There's hardly anything nodes can do that statuses can't.

pribeh’s picture

Hi gomino,

I guess I am mistaken. I would agree with everything IceCreamYou has said as well: FBSS and FBSMP is the platform to use if you want to gain access to this type of functionality.

Also, as for http://www.iliketotallyloveit.com, I'm not sure what they are currently using for links but a person behind it did contact me awhile ago and said that they were going to switch over to using FBSL or FBSMP.

Best,

Thomas

gomino’s picture

Hi IceCreamYou and Pribeh,

I know fbsmp is great but unfortunately, it is limited to posting the scraped image to the status provided by fbss.

I want to do a social bookmarking site like the good old delicious but with more data associated to each link which will be provided by the user. So I see the links as nodes because I want to associate many data types to them and I would like them to be created and seen on their own page with their own URL each one.

Then the webpage will let other users interact with that data associated to the links.

Also, I want to have the same functionality as the bookmarklet module so users can start adding links while they browse the web and so clicking on the bookmarklet button would take them to the link creation page with the URL field already filled.

I guess a lot of people want to have this social bookmarking functionality. There are a lot of sites that do this.

One site that particularly capted my attention is this one: http://www.pearltrees.com/

Thanks.

Gomino.

icecreamyou’s picture

FBSS and FBSMP can do everything you said.

gomino’s picture

Do you mean creating a new module that calls hooks from FBSMP and FBSS or, directly using those?.
If so, creating new content, how can you use FBSMP?

Thanks

icecreamyou’s picture

No I mean directly using FBSS and FBSMP. No new modules required.

gomino’s picture

Thank you IceCreamYou,

I guess I have not read the whole documentation. I will give it a thorough look.

pribeh’s picture

Hi gomino,

I guess I am mistaken. I would agree with everything IceCreamYou has said as well: FBSS and FBSMP is the platform to use if you want to gain access to this type of functionality.

Also, as for http://www.iliketotallyloveit.com, I'm not sure what they are currently using for links but a person behind it did contact me awhile ago and said that they were going to switch over to using FBSL or FBSMP.

Best,

Thomas

jonthomas83’s picture

I personally think that we need CCK as a further option so I've set up a discussion in the CCK group if anyone wants to discuss or support the idea.

http://groups.drupal.org/node/94979

It's all well and good having "lightweight" modules like this which undoubtedly do the job and do it well, but for those who want to support the modular approach in which Drupal is going, I think that a CCK option would be a welcome addition to the ever growing featureset of CCK, this is especially true given that fields api is now core in D7.

Please don't see this as a negative response to a great module, but rather another way of implementing it in a more Drupal-like approach if you will. If anything we need more people like you guys who put ideas into action and I applaud you for your efforts on these modules, they've no doubt helped tons of people. :)

icecreamyou’s picture

FYI, anything can be fieldable in D7, so that is not an advantage for using nodes (i.e. CCK) over custom entities. Any field that worked with CCK could also theoretically work with status updates.

butler360’s picture

Just went looking for this today and found this: http://drupal.org/project/imagefetchr

It's brand new so I haven't tried it but it sounds right based on the description.

elimuir’s picture

http://drupal.org/project/imagefetchr

The module is using CCK and filefield to store images associated with nodes and the client-side javascript is designed to search all the node form fields for any URLS to retrieve images from.

If you want the effect as described in the original post, then I would recommend using a bookmarklet stored in the browser that can pre-populate form fields. See Prepopulate module

Related posts:
http://groups.drupal.org/node/94979
http://drupal.org/node/296465

radoo’s picture

Is there any solution for D7?