{"action":"created","issue":{"url":"https://api.github.com/repos/hybridauth/hybridauth/issues/928","repository_url":"https://api.github.com/repos/hybridauth/hybridauth","labels_url":"https://api.github.com/repos/hybridauth/hybridauth/issues/928/labels{/name}","comments_url":"https://api.github.com/repos/hybridauth/hybridauth/issues/928/comments","events_url":"https://api.github.com/repos/hybridauth/hybridauth/issues/928/events","html_url":"https://github.com/hybridauth/hybridauth/issues/928","id":304169099,"number":928,"title":"LinkedIn setUserStatus error.","user":{"login":"RajeshPerro","id":1628370,"avatar_url":"https://avatars2.githubusercontent.com/u/1628370?v=4","gravatar_id":"","url":"https://api.github.com/users/RajeshPerro","html_url":"https://github.com/RajeshPerro","followers_url":"https://api.github.com/users/RajeshPerro/followers","following_url":"https://api.github.com/users/RajeshPerro/following{/other_user}","gists_url":"https://api.github.com/users/RajeshPerro/gists{/gist_id}","starred_url":"https://api.github.com/users/RajeshPerro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RajeshPerro/subscriptions","organizations_url":"https://api.github.com/users/RajeshPerro/orgs","repos_url":"https://api.github.com/users/RajeshPerro/repos","events_url":"https://api.github.com/users/RajeshPerro/events{/privacy}","received_events_url":"https://api.github.com/users/RajeshPerro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-11T15:52:54Z","updated_at":"2018-03-11T17:27:40Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nHere is my method to post in LinkedIn but I am getting error please help!\r\n Fatal Error:\r\nArrayObject Object\r\n(\r\n[storage:ArrayObject:private] => Array\r\n(\r\n[exception] => Hybridauth\\Exception\\HttpRequestFailedException Object\r\n(\r\n[message:protected] => Signed API request has returned an error. HTTP error 401. Raw Provider API response: {\r\n\"errorCode\": 0,\r\n\"message\": \"Empty oauth2_access_token\",\r\n\"requestId\": \"GT3BPWBLSX\",\r\n\"status\": 401,\r\n\"timestamp\": 1520772798106\r\n}.\r\n\r\n\r\n//This is my method........\r\npublic function postToLinkedin($lnAppkey,$lnAppSec,$lnToken)\r\n{\r\nif($lnAppkey !=null && $lnAppSec !=null && $lnToken !=null)\r\n{\r\n$_SESSION['app_id_linkedIn'] = $lnAppkey;\r\n$_SESSION['app_sec_linkedIn'] = $lnAppSec;\r\n$_SESSION['access_token_linkedIn'] = $lnToken;\r\n}\r\n\r\n    $config = [\r\n        'callback' => $request->getBaseUrl().'/socialpost/application/postToLinkedin',\r\n        \"enabled\" => true,\r\n        'keys' => [\r\n            'key' => $_SESSION['app_id_linkedIn'],\r\n            'secret' => $_SESSION['app_sec_linkedIn']\r\n        ],\r\n\r\n    ];\r\n// Instantiate LinkedIn Adapter.\r\n$linkedin = new Hybridauth\\Provider\\LinkedIn($config);\r\n\r\n// Authenticate the user.\r\n$linkedin->setAccessToken($_SESSION['access_token_linkedIn']);\r\n\r\n// Update the user status.\r\n$response = $linkedin->setUserStatus([\r\n'comment' => '',\r\n'content' => [\r\n'title' => 'This is a post',\r\n'description' => \"I am trying to post a demo content\",\r\n'submitted-url' => '',\r\n'submitted-image-url' => '',\r\n],\r\n'visibility' => [\r\n'code' => 'anyone',\r\n],\r\n]);\r\n\r\n}"},"comment":{"url":"https://api.github.com/repos/hybridauth/hybridauth/issues/comments/372132757","html_url":"https://github.com/hybridauth/hybridauth/issues/928#issuecomment-372132757","issue_url":"https://api.github.com/repos/hybridauth/hybridauth/issues/928","id":372132757,"user":{"login":"ApacheEx","id":1918108,"avatar_url":"https://avatars2.githubusercontent.com/u/1918108?v=4","gravatar_id":"","url":"https://api.github.com/users/ApacheEx","html_url":"https://github.com/ApacheEx","followers_url":"https://api.github.com/users/ApacheEx/followers","following_url":"https://api.github.com/users/ApacheEx/following{/other_user}","gists_url":"https://api.github.com/users/ApacheEx/gists{/gist_id}","starred_url":"https://api.github.com/users/ApacheEx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ApacheEx/subscriptions","organizations_url":"https://api.github.com/users/ApacheEx/orgs","repos_url":"https://api.github.com/users/ApacheEx/repos","events_url":"https://api.github.com/users/ApacheEx/events{/privacy}","received_events_url":"https://api.github.com/users/ApacheEx/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T17:27:40Z","updated_at":"2018-03-11T17:27:40Z","author_association":"COLLABORATOR","body":"it seems you have setted a wrong access token.\r\n\r\ncan you show me how your access token looks like:\r\n\r\n`var_dump($_SESSION['access_token_linkedIn']);`\r\n\r\n\r\nwhich exactly the version of HA you use?"}}
{"actor":{"display_login":"ApacheEx"}}