Main menu

How can I make custom calls when a visitor log in with Facebook Connect?

0

I would like to change save more data from the Facebook user informations, when someone log in or registering through the Facebook plugin. Is there any actions associated with Facebook Connect plugin?

0

There are 3 different actions.

  1. User registering through Facebook action
  2. User log in through Facebook action
  3. User connect own account with Facebook account action

Register Action

do_action('nextend_fb_user_registered', $ID, $user_profile, $facebook);

Usage in your plugin or template:

function my_fb_register_function($user_wp_id, $user_profile, $facebook){
  // here comes your code
}
add_action( 'nextend_fb_user_registered', 'my_fb_register_function',10,3 );

Login Action

do_action('nextend_fb_user_logged_in', $ID, $user_profile, $facebook);

Usage in your plugin or template:

function my_fb_login_function($user_wp_id, $user_profile, $facebook){
  // here comes your code
}
add_action( 'nextend_fb_user_logged_in', 'my_fb_login_function',10,3 );

Account Linking Action

do_action('nextend_fb_user_account_linked', $ID, $user_profile, $facebook);

Usage in your plugin or template:

function my_fb_link_function($user_wp_id, $user_profile, $facebook){
  // here comes your code
}
add_action( 'nextend_fb_user_account_linked', 'my_fb_link_function',10,3 );

The Parameters

1. Parameter - $user_wp_id

WordPress user identifier

2. Parameter - $user_profile

Array
(
    [id] => 1454423964
    [name] => Soós Roland
    [first_name] => Roland
    [last_name] => Soós
    [link] => http://www.facebook.com/roland.soos
    [username] => roland.soos
    [gender] => male
    [email] => rola*******endweb.com
    [timezone] => 1
    [locale] => en_GB
    [verified] => 1
    [updated_time] => 2013-01-16T15:43:34+0000
)

3. Parameter - $facebook

Class definition of the PHP object: BaseFacebook

Usage examples: Example codes

Your Answer

Please login first to submit.