http://drupal.org/project/oauth

Perhaps it would make it easier for you Dave if you make this a dependency. Less code for you to maintain :)
FB example here as well
http://drupal.org/project/oauthconnector

Sooner or later oauth will be in core as well #1148990: Add an oauth identity provider to core

There is also a separate project
http://drupal.org/project/fboauth

Comments

Dave Cohen’s picture

modules/fb doesn't have any oauth code in it. Instead it requires facebook's php sdk which takes care of all that.

The next version of modules/fb won't require the fb php sdk. This might be relevant then.

vinoth.3v’s picture

I would be Great if we integrate and use OAuth and OAuth Connector's login modal with new version of FB 4.x. So users can have mutiple social accounts connected with single drupal user. + developers can use the power of Drupal for FB module.

Please add the 7.4.x version so we can test and tag issues for 4.x

Dave Cohen’s picture

My goal is to not introduce any dependency on another module. However, I'd like fb.module to work properly alongside these modules when they are both enabled.

For example I know of at least one site with fboauth and Drupal for Facebook both installed (mostly for historical reasons). They are fine together as long as the settings (app id, secret) are kept in sync.

If you run into specific problems with that please submit an issue.

vinoth.3v’s picture

I'd like fb.module to work properly alongside these modules when they are both enabled.

Thats fine! :)

sonicthoughts’s picture

+1 to maintain multiple social accounts connected.

sonicthoughts’s picture

Issue summary: View changes

haj

giorgio79’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev
Issue summary: View changes

Maybe 7.4x :)

Dave Cohen’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not interested in adding dependencies to modules/fb. It should run fine with just drupal core plus modules/fb.

I would like modules/fb to peacefully coexist with oauth modules when they are installed. If that's not the case, please describe specifically what doesn't work.

sonicthoughts’s picture

Hi- I'm looking at several other FB Drupal modules/approaches also. Dave, you say "I would like modules/fb to peacefully coexist with oauth modules when they are installed. If that's not the case, please describe specifically what doesn't work."
As I understand it, either FB module or another oauth can authenticate. If the oauth does, then won't this module also have to, or is there a way to maintain the authentication/token?

Dave Cohen’s picture

If an oauth or third-party module invokes fb_user_token($client_id, $token); then modules/fb will be aware and work with the token. ($client_id is the id of the facebook app.)

Similarly, third-party module will be notified when modules/fb gets a token, if they implement hook_fb(). Hook_fb is like the very old hook_nodeapi() in that it takes an $op parameter. In this case the $op is FB_OP_TOKEN_USER.