Changeset 1004796
- Timestamp:
- 10/09/2014 10:14:06 PM (11 years ago)
- Location:
- wordpress-social-login
- Files:
-
- 2 edited
-
tags/2.2.2/hybridauth/Hybrid/Providers/LinkedIn.php (modified) (6 diffs)
-
trunk/hybridauth/Hybrid/Providers/LinkedIn.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wordpress-social-login/tags/2.2.2/hybridauth/Hybrid/Providers/LinkedIn.php
r1002140 r1004796 51 51 } 52 52 else{ 53 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token .", 5 );53 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token:" . print_r( $response, true ), 5 ); 54 54 } 55 55 } … … 64 64 65 65 if ( ! $oauth_verifier ){ 66 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token .", 5 );66 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token:" . htmlentities( print_r( $_REQUEST, true ) ), 5 ); 67 67 } 68 68 … … 81 81 } 82 82 else{ 83 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token .", 5 );83 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token:" . print_r( $response, true ), 5 ); 84 84 } 85 85 } … … 92 92 try{ 93 93 // http://developer.linkedin.com/docs/DOC-1061 94 $response = $this->api->profile('~:(id,first-name,last-name,public-profile-url,picture-url, email-address,date-of-birth,phone-numbers,summary)');94 $response = $this->api->profile('~:(id,first-name,last-name,public-profile-url,picture-url,picture-urls::(original),email-address,date-of-birth,phone-numbers,headline)'); 95 95 } 96 96 catch( LinkedInException $e ){ … … 115 115 $this->user->profile->photoURL = (string) $data->{'picture-url'}; 116 116 $this->user->profile->profileURL = (string) $data->{'public-profile-url'}; 117 $this->user->profile->description = (string) $data->{' summary'};117 $this->user->profile->description = (string) $data->{'headline'}; 118 118 119 119 if( $data->{'phone-numbers'} && $data->{'phone-numbers'}->{'phone-number'} ){ … … 128 128 $this->user->profile->birthMonth = (string) $data->{'date-of-birth'}->month; 129 129 $this->user->profile->birthYear = (string) $data->{'date-of-birth'}->year; 130 } 131 132 if( (string) $data->{'picture-urls'}->{'picture-url'} ){ 133 $this->user->profile->photoURL = (string) $data->{'picture-urls'}->{'picture-url'}; 130 134 } 131 135 -
wordpress-social-login/trunk/hybridauth/Hybrid/Providers/LinkedIn.php
r1002140 r1004796 51 51 } 52 52 else{ 53 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token .", 5 );53 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token:" . print_r( $response, true ), 5 ); 54 54 } 55 55 } … … 64 64 65 65 if ( ! $oauth_verifier ){ 66 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token .", 5 );66 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token:" . htmlentities( print_r( $_REQUEST, true ) ), 5 ); 67 67 } 68 68 … … 81 81 } 82 82 else{ 83 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token .", 5 );83 throw new Exception( "Authentication failed! {$this->providerId} returned an invalid Token:" . print_r( $response, true ), 5 ); 84 84 } 85 85 } … … 92 92 try{ 93 93 // http://developer.linkedin.com/docs/DOC-1061 94 $response = $this->api->profile('~:(id,first-name,last-name,public-profile-url,picture-url, email-address,date-of-birth,phone-numbers,summary)');94 $response = $this->api->profile('~:(id,first-name,last-name,public-profile-url,picture-url,picture-urls::(original),email-address,date-of-birth,phone-numbers,headline)'); 95 95 } 96 96 catch( LinkedInException $e ){ … … 115 115 $this->user->profile->photoURL = (string) $data->{'picture-url'}; 116 116 $this->user->profile->profileURL = (string) $data->{'public-profile-url'}; 117 $this->user->profile->description = (string) $data->{' summary'};117 $this->user->profile->description = (string) $data->{'headline'}; 118 118 119 119 if( $data->{'phone-numbers'} && $data->{'phone-numbers'}->{'phone-number'} ){ … … 128 128 $this->user->profile->birthMonth = (string) $data->{'date-of-birth'}->month; 129 129 $this->user->profile->birthYear = (string) $data->{'date-of-birth'}->year; 130 } 131 132 if( (string) $data->{'picture-urls'}->{'picture-url'} ){ 133 $this->user->profile->photoURL = (string) $data->{'picture-urls'}->{'picture-url'}; 130 134 } 131 135
Note: See TracChangeset
for help on using the changeset viewer.