Esempio n. 1
0
         // no email or id supplied
         echo "You must supply an email address or LinkedIn ID to send out the invitation to connect.";
     }
     break;
 case 'like':
     /**
      * Handle 'likes'.
      */
     // check the session
     if (!oauth_session_exists()) {
         throw new LinkedInException('This script requires session support, which doesn\'t appear to be working correctly.');
     }
     $OBJ_linkedin = new LinkedIn($API_CONFIG);
     $OBJ_linkedin->setTokenAccess($_SESSION['oauth']['linkedin']['access']);
     if (!empty($_GET['nKey'])) {
         $response = $OBJ_linkedin->like($_GET['nKey']);
         if ($response['success'] === TRUE) {
             // update 'liked'
             header('Location: ' . $_SERVER['PHP_SELF']);
         } else {
             // problem with 'like'
             echo "Error 'liking' update:<br /><br />RESPONSE:<br /><br /><pre>" . print_r($response, TRUE) . "</pre><br /><br />LINKEDIN OBJ:<br /><br /><pre>" . print_r($OBJ_linkedin, TRUE) . "</pre>";
         }
     } else {
         echo "You must supply a network update key to 'like' an update.";
     }
     break;
 case 'message':
     /**
      * Handle connection messaging.
      */