oauth - Having trouble with the oauth_verifier for offline use in simple linkedin php -
disclaimer, please pardon grammatical syntax.
i'm using simple linkedin php library offered on linkedin's site. have followed instructions , have collected users oauth-token , oauth-secret. 2 pieces of information have been stored in database. know how make offline oauth call, im having trouble finding more information on oath-verifier. code have 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 keys on own trying bottleneck behavior. again, authentication successful, attempt make call users profile when user offline failure. believe because im missing oauth-verifier, don't believe oauth-verifier necessary make offline call.the code pretty breaks without errors (if possible). have not tempered linkedin library nor there errors in global.settings.php.
if have stored user's access token need feed access token in library , make calls. demo file, along 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);
Comments
Post a Comment