Recently I developed a project which integrates Drupal with Facebook Social features and https://github.com/workhabitinc/drupal-ios-sdk.

I had to develop a mini-module which implements a Services resource for this module. Feel free to use it, test it and improve it or include in FBOauth.

Here it is the sandbox project page:
http://drupal.org/sandbox/utneon/1903856

Comments

artusamak’s picture

utneon, I suggest you to try to provide a patch to extend the existing codebase, it will have more chances to get in that way.

I will require this feature for a client, i may post a patch if you don't want to. :)

utneon’s picture

Please do that, I currently don't have to time to do that, I'm currently occupied working on some other modules like commerce_bcash.

artusamak’s picture

Title: Please provide a Services Resource for FBOauth - I created a sandbox project with that implementation » Expose Facebook connect as a Services ressource
Version: 7.x-1.6 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new4.95 KB

Here is the patch, i also changed a bit the logic of fboauth_create_user() to let the webservice specify values for the user data (preload the user fields for instance).

The sandbox was only connecting an existing user, i added the support for the creation of the user account if a match is not found for the user with its facebook ID.

The resource is usable when you post a data array in POST structured like that:
* access_token: Token returned by Facebook once you loggin the user
* user_data: array of Drupal fields value (eg: 'first_name' => array(LANGUAGE_NONE => array('value' => 'Artusamak'))).

utneon’s picture

I just pushed a new commit to the Facebook Oauth Services Sandbox module that implements the create user function in the sandbox module itself instead of modifying the fboauth.

I'm using this on production site so I didn't want to alter the fboauth module. fboauth_services extends that feature.

http://drupal.org/sandbox/utneon/1903856

skolesnyk’s picture

Issue summary: View changes

Has this been integrated finally into FBAuth?

goz’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
StatusFileSize
new5.35 KB

Re-roll patch for 7.x-2.x