2013-05-28 63 views
0

我有問題使用api http://code.google.com/p/simple-linkedinphp/在Linkedin組中發佈消息。linkedin ANetAuthException非會員

利用這種請求:

$OBJ_linkedin = new LinkedIn($API_CONFIG); 
$response = $OBJ_linkedin->createPost( "IDGROUP" , "title test", "message test"); 

我收到該響應:

<error> 
    <status>403</status> 
    <timestamp>1369732087697</timestamp> 
    <request-id>NNPMM1EN5E</request-id> 
    <error-code>0</error-code> 
    <message>com.linkedin.anet.auth.pub.ANetAuthException: nonMember: anetID=IDGROUP </message> 
<error> 

我頂替正確地與組ID IDGROUP並且還和的AppKey AppSecret是正確的。

回答

0

您必須在進行api調用之前設置access token

$OBJ_linkedin->setTokenAccess(array("oauth_token" => $oauth_token, 
          "oauth_token_secret" => $oauth_token_secret)); 
+0

你是對的。謝謝。它現在有效。 :-) –