Social networking accounts: unified approach to store in external account data in user content profiles?

Events happening in the community are now at Drupal community events on www.drupal.org.
pvhee's picture

Currently, drupal integration with networking sites happens through contrib modules that all store their settings in different ways. For example, both Facebook Connect and Twitter store combinations of drupal user IDs with external IDs (Facebook uid, and Twitter account name) in custom database tables, and both provide a custom interface to edit social network account information in a user profile. Consequently, views integration is custom and relies on the contrib module to implement it. For example, Facebook Connect does not provide views integration while Twitter does. For other social networking sites, such as LinkedIn, there is not even a drupal contrib module.

What all of these modules have in common, is that they need to store a mapping between a user and the account on the social network site. Therefore, it makes sense to store them in a uniform way. Here I would propose a CCK-based solution, for example a module that implements a "social field" that can contain that information coming from 3rd party social network sites. The design of that field would be much like emfield, which stores 3rd party videos/images/songs in a uniform manner.

With this CCK field inside the user profile content type, a user could complete his/her social network sites in a straightforward way (instead of the current situation in which the contrib module defines where and how the user enters that info). If social networking modules such as FbConnect or Twitter are enabled, it could go one step further and hand over that data to those modules (by hooking into those modules), so they work in exactly the same way as before but instead take data from the CCK field instead of their own custom tables. For Drupal 7, where fields are the basis for user profiles by default, it could be turned into an API module used by modules such as Twitter, FbConnect and various others that have the need to combine an external user account with a local user account (eg even the core OpenID module).

This idea is still very much under development, but I'd like to hear your feedback on it! If you have a similar situation/problem, I'd like to hear it as well.

Comments

Another opinion

andypost's picture

if you talk about IDs so OpenID already have a solution but still in progress - not only storing but exchanging data.

All other staff should be stored in fieldable storage to conform d7 paradigm

I like this idea

arrow_ben's picture

Your idea for including social networks links via a CCK based solutions is terrific. Its much more straight forward and "cleaner" than other solutions available. I really hope this idea sees the light of day. I am currently facing a similar challenge. Basically, I would like to add Facebook, LinkedIn, XING and twitter to my content profiles - it is possible to do but its just so messy. Not to mention all modules one has to download for each social networking link.

I am surprised your idea has not generated more feedback given the number of members downloading social networking related modules.

I like this idea too.

Rhino's picture

I like this idea too.

Anyone wants to help to get this idea forward?

pvhee's picture

I am still willing to push this idea a little forward, but the major adoption then will need to come from the maintainers of social network modules. The Social CCK itself will initially just be an API to store social data in CCK, and not provide any social network specific functionality. If anyone is willing to work on this idea as well, please let me know.

More than just social networking accounts

yktdan's picture

Besides social networks, many sites use a CRM, such as CiviCRM, to contain a lot of information about a user, typically, all the usual address, phone, etc., but also donation records, volunteer hours, etc.

Even more integrated modules like Ubercart tend to have their own information about the user that are not well integrated into Drupal, e.g. it has shipping and billing address.

Each external site tends to keep a unique set of data about a user, as well as wanting to share the more standard stuff so that the user only has to change that in one place. The problems arise because each external site tends to think they are the master and willing to share but not copy. For example, resolving different phone numbers across sites is hard without either interacting with the user or time stamping everything.

good aproach

Thomas_Zahreddin's picture

i like the idea, maybe http://live.gnome.org/Gwibber can be used as a blueprint ?

Post It Everywhere ?

MacRonin's picture

Just thought I'd link to another new project that I would hope to see join in the effort.

http://drupal.org/project/postiteverywhere

From the developer organization

confiz's picture

We will surely look into this idea as soon as we get some bandwidth. We recommend all of you to check out this module and provide us with some suggestions or feature requests.

Any ideas are welcomed.

I think the core idea of this

voxpelli's picture

I think the core idea of this thread makes much sense. I don't like the fact that each and every third party integrator are saving and exposing their data in their own way.

When I needed to use Facebook Connect for a site I first started out using the Facebook Connect module from Drupal.org - but frustrated with it not working the way I needed it to and not being flexible enough if we wanted to add Twitter as a sign in option later on I decided to rewrite it from scratch on top of a new common API module which I called Connector.

Since then I've had other people implementing the module on their sites and working with me on developing it - but we haven't yet had the time to create any other connector module than Facebook and to avoid having to push a duplicate module to Drupal.org I've avoided pushing anything up here. Because of recent discussions on this subject I decided to publish at least the API module though - you can find it here: http://drupal.org/project/connector

It doesn't use CCK - instead it saves the connection between a Drupal account and an external account the same way that OpenID does - in a special table provided by Drupal core. Anyway - it's kind of a similar idea to yours.

Interesting initiative! In

pvhee's picture

Interesting initiative! In the meantime, I started work on the socialfield module on GitHub as well: http://github.com/pvhee/socialfield, the drupal module will come here: http://drupal.org/project/socialfield. Development hasn't progressed much lately, but I'll hope to pick up on it very soon.

I'll follow your work and hopefully at some point we can merge our efforts.

I think voxpelli has the best

cerup's picture

I think voxpelli has the best approach.

I think current modules (facebook, twitter, etc) are going about all this in the wrong way. They are trying to implement to many features per module and making it harder to maintain and customize.

I think what there needs to be is a social API (maybe connector if people get on board). I think the API should handle the UI and connection part of things. Then there would be a submodule for each social network; there would be a twitter, facebook, linkedin, myspace, etc module that ONLY allows people to connect, login and register through drupal in a uniform way (regardless of the social network). Then people can use the API and create extended modules that implement things like status sharing (like post it everywhere) and things like that. 90% of website developers only need/want there users to connect/register through social login - they don't need all the extra things right off the bat. Therefore, we really need a social API that strips out all the unnecessary stuff (that causes massive bugs and inconsistent UIs) and create an API that just connects people and then other modules can build off this API. Essentially, we want to create a service like RPX or gigya, but without monthly payments and that integrates natively with drupal.

voxpelli, what is the status of connector? I think you have the right idea right now, but we need to get more people on board.

The status is that I share

voxpelli's picture

The status is that I share your view of what the module should become and that I currently are coordinating with my co-maintainer how to get the work done.

Will have some kind of a release done prior to DrupalCon SF.

Curious how its going

MacRonin's picture

Just a bit Curious how its going. DrupalCon is just around the corner.

It's progressing but I've hit

voxpelli's picture

It's progressing but I've hit a few obstacles - like a tight deadline at work which has made me unable to work on it for some weeks.

Looking like I need a couple of more weeks before a release unfortunately.

Thanks for the update

MacRonin's picture

Thanks for the update,
I'm glad to hear that even with obstacles that it's still progressing.

We could meet up to discuss

pvhee's picture

We could meet up to discuss socialfield and related initiatives with everyone that is at DrupalCon.

I'll be there starting from the unconference on Sunday. Text me on twitter (@nuvolevof) or let me know something through the contact form!

Peter, Nuvole

Interesting! Subscribing...

paganwinter's picture

Interesting!
Subscribing...

Just wanted to let you know

voxpelli's picture

Just wanted to let you know that the first alpha releases of my modules Connector and OAuth Connector has been released. I've also written a blog post with a screencast that introduces it: http://goodold.se/blog/tech/first-alpha-oauth-connector-released

Just in time for DrupalCon - only one DrupalCon late ;)

Content Construction Kit (CCK)

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week