Disclaimer, Please pardon grammatical syntax.
I'm using the simple linkedin php library that is offered on the linkedin's site. I have followed their instructions and have successfully collected the users oauth-token and oauth-secret. Those 2 pieces of information have been stored in a database. I would like to know how make an offline oauth call, but im having trouble finding more information on the oath-verifier. This is the code that i have so far.
include('../../php/linkedin/linkedin_3.2.0.class.php');
include '../../php/global.settings.php';
$API_CONFIG = array(
'appKey' => LINKEDIN_APP_KEY,
'appSecret' => LINKEDIN_APP_SECRET,
'callbackUrl' => NULL
);
$linkedin = new LinkedIn($API_CONFIG);
$linkedin->request_token = "4e1e5ede-1de4-4eba-ba33-d3d37cbe67ff -FAKE";
$linkedin->access_token = "82b2c333-1075-441b-a51f-657196bf507w -FAKE";
$search_response = $linkedin->search("?company-name=facebook&count=10");
var_dump($search_response);
Temporarily I'm inserting the keys their on my own trying to bottleneck the behavior. Again, the authentication was successful, but my attempt to make a call to the users profile when the user is offline is a failure. I believe it is because im missing the oauth-verifier, but i don't believe that the oauth-verifier is necessary to make an offline call.The code pretty much breaks without any errors (if that is possible). I Have not tempered with the linkedin library nor there are any errors in the global.settings.php.
If you have already stored the user's access token then all you need to do is feed the access token in to the library and make your calls. From the demo file, something along the lines of:
$API_CONFIG = array(
'appKey' => LINKEDIN_APP_KEY,
'appSecret' => LINKEDIN_APP_SECRET,
'callbackUrl' => NULL
);
$linkedin = new LinkedIn($API_CONFIG);
$linkedin->setToken(array(
'oauth_token' => $token,
'oauth_token_secret' => $secret
));
$search_response = $linkedin->search("?company-name=facebook&count=10");
var_dump($search_response);