Support » Plugin: Nextend Twitter Connect » Twitter Error 3 upon login

Viewing 9 replies - 1 through 9 (of 9 total)
  • Here’s the issue.. https://github.com/themattharris/tmhOAuth/issues/137

    To Fix it follow these steps:

    1. Download & unzip the latest tmhOauth
    https://github.com/themattharris/tmhOAuth/archive/master.zip

    2. Replace the old tmhOauth file located in
    “\wp-content\plugins\nextend-twitter-connect\sdk”
    with the newer version.

    3. Open “\wp-content\plugins\nextend-twitter-connect\nextend-twitter-connect.php” and replace
    $tmhOAuth->url('1/account/verify_credentials')
    to
    $tmhOAuth->url('1.1/account/verify_credentials')
    on lines 143 & 145

    That should do it.

    To fix the twitter avatars:

    Open “\wp-content\plugins\nextend-twitter-connect\nextend-twitter-connect.php”

    Replace
    update_user_meta($ID, 'twitter_profile_picture', 'https://api.twitter.com/1.1/users/profile_image?user_id=' . $resp->id . '&size=bigger');

    with
    update_user_meta($ID, 'twitter_profile_picture', $resp->profile_image_url );

    or if you want to cache the images instead of just linking from twitter then do this instead:

    Replace
    update_user_meta($ID, 'twitter_profile_picture', 'https://api.twitter.com/1.1/users/profile_image?user_id=' . $resp->id . '&size=bigger');

    With

    //cache profile imgs
    		  $uploads = wp_upload_dir();
    		  $upbase = $uploads['basedir'].'/';
    		  $upurl = $uploads['url'].'/';
    
                      //u can use any folder structure u'd like by changing this array.
                      //the files will be downloaded in your wp uploads folder
    
    		  $structure_arr = array('user','img','tw');
    
    		  $structure = '';
    		  foreach($structure_arr as $folder){
    			$structure .=  $folder . '/' ;
    			}
    		  $img_dir = $upbase.$structure;
    		  If(!file_exists($img_dir)) {
    			foreach($structure_arr as $folder){
    					$dir = $upbase .$folder . '/';
    					If(!file_exists($dir)){
    						mkdir($dir);
    						$upbase = $dir;
    					}
    			}
    		 }
    		 $tw_img = str_replace('_normal','',$resp->profile_image_url);
    		 $spt_tw_img = explode('.',$tw_img);
    		 $tw_ext ='.' . end($spt_tw_img);
    		 $file_name = $img_dir.$ID.$tw_ext;
    		 $get_tw_img = file_get_contents($tw_img);
    		  file_put_contents($file_name,$get_tw_img);
    		  update_user_meta($ID, 'twitter_profile_picture',  $upurl . $structure.$ID.$tw_ext);

    Hopefully they update the plugin soon.. and if they do remember that it’ll wipe out the caching option from above unless they adopt it.

    You are brilliant, thank you for taking the time to post this. Really appreciate it. Someone give this man a beer!

    edited out. fixed

    Hi dear Padreed123,

    I got an error Twitter Error 1

    I changed above all before i got Twitter Error 3 now Twitter Error 1 how can i fix the error?

    The plugin has been recently updated.

    I download and updated the new plugin 1.4.59 version but now i got error like

    Twitter Error 1

    hey gsivaprabu,

    I think I fixed the problem on my end. What PHP version are you running? It looks like the how it determined a couple file paths would only work with PHP > 5.3. It was using __DIR__ instead of the following

    I updated tmOAuth.php lines 67 & 68 to

    'curl_cainfo'    => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cacert.pem',
    'curl_capath'   => dirname(__FILE__),

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Twitter Error 3 upon login’ is closed to new replies.