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

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.

Login to post comments

Another opinion

andypost's picture
andypost - Mon, 2009-09-07 06:00

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 - Sat, 2009-10-10 21:59

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.