Main menu

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

0

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

0

There are 3 different actions.

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

Register Action

do_action('nextend_twitter_user_registered', $ID, $resp, $tmhOAuth);

Usage in your plugin or template:

function my_twitter_register_function($user_wp_id, $response, $tmhOAuth){
  // here comes your code
}
add_action( 'nextend_twitter_user_registered', 'my_twitter_register_function',10,3);

Login Action

do_action('nextend_twitter_user_logged_in', $ID, $resp, $tmhOAuth);

Usage in your plugin or template:

function my_twitter_login_function($user_wp_id, $response, $tmhOAuth){
  // here comes your code
}
add_action( 'nextend_twitter_user_logged_in', 'my_twitter_login_function',10,3);

Account Linking Action

do_action('nextend_twitter_user_account_linked', $ID, $resp, $tmhOAuth);

Usage in your plugin or template:

function my_twitter_link_function($user_wp_id, $response, $tmhOAuth){
  // here comes your code
}
add_action( 'nextend_twitter_user_account_linked', 'my_twitter_link_function',10,3);

The Parameters

1. Parameter - $user_wp_id

WordPress user identifier

2. Parameter - $resp

stdClass Object
(
    [id] => 776416184
    [profile_background_color] => C0DEED
    [profile_background_image_url_https] => https://si0.twimg.com/profile_background_images/670104957/1be469b4d7141042f5b05bc104082600.png
    [profile_background_image_url] => http://a0.twimg.com/profile_background_images/670104957/1be469b4d7141042f5b05bc104082600.png
    [profile_image_url] => http://a0.twimg.com/profile_images/2652540895/034052930dc1fc7eedf137f1e98b8f97_normal.png
    [is_translator] =>
    [screen_name] => nextendweb
    [profile_link_color] => 0084B4
    [utc_offset] => 3600
    [profile_banner_url] => https://si0.twimg.com/profile_banners/776416184/1348732690
    [default_profile] =>
    [name] => nextendweb
    [lang] => hu
    [contributors_enabled] =>
    [profile_use_background_image] => 1
    [created_at] => Thu Aug 23 17:35:33 +0000 2012
    [protected] =>
    [time_zone] => Budapest
    [profile_text_color] => 333333
    [id_str] => 776416184
    [listed_count] => 0
    [url] => http://nextendweb.com
    [geo_enabled] =>
    [profile_sidebar_border_color] => FFFFFF
    [profile_image_url_https] => https://si0.twimg.com/profile_images/2652540895/034052930dc1fc7eedf137f1e98b8f97_normal.png
    [following] =>
    [verified] =>
    [profile_background_tile] =>
    [follow_request_sent] =>
    [followers_count] => 10
    [profile_sidebar_fill_color] => DDEEF6
    [default_profile_image] =>
    [location] =>
    [status] => stdClass Object
        (
            [possibly_sensitive_editable] => 1
            [place] =>
            [favorited] =>
            [created_at] => Wed Jan 16 09:17:44 +0000 2013
            [possibly_sensitive] =>
            [in_reply_to_status_id_str] =>
            [id_str] => 291474307106865153
            [coordinates] =>
            [in_reply_to_user_id_str] =>
            [contributors] =>
            [retweet_count] => 0
            [retweeted] =>
            [text] => From now Accordion Menu and Smart Slider support the Cobalt CCK system. Also we are the most voted topic on their... http://t.co/U5u3CcJZ
            [source] => Facebook
            [in_reply_to_screen_name] =>
            [in_reply_to_user_id] =>
            [in_reply_to_status_id] =>
            [id] => 291474307106865153
            [geo] =>
            [truncated] =>
        )
    [friends_count] => 6
    [notifications] =>
    [favourites_count] => 0
    [statuses_count] => 18
    [description] => Premium softwares for WordPress and Joomla.
)

3. Parameter - $tmhOAuth

Class definition of the PHP object: tmhOAuth

Usage examples: Example codes

Your Answer

Please login first to submit.