Linkedin APi に接続できたので、以下のコードを使用してユーザーの詳細を取得できます。
$response = $OBJ_linkedin->profile('~:(id,first-name,last-name,picture-url,email-address,phone-numbers)');
if($response['success'] === TRUE) {
$response['linkedin'] = new SimpleXMLElement($response['linkedin']);
その後、取得した詳細をこのようなテキスト フィールドに表示する必要があります。
<table border="1">
<tr>
<td>Name</td>
<td><?php echo $response['linkedin']->id; ?></td>
</tr>
<tr>
<td>first Name</td>
<td><?php echo $response['linkedin']->first-name; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $response['linkedin']->email-address; ?></td>
</tr>
</table>
ID は正しく表示されていますが、その他の詳細は表示されていません。誰でもこれについて助けることができます。前もって感謝します
これはxml出力です
this is : Array ( [linkedin] => KmRPC6CWFV Dam Path0 http://m.c.lnkd.licdn.com/mpr/mprx/0_TLYPQpjA4IBXz8ZqfCOhQxS04wrNB8dq_TE2Qxj8FDXkegggdXONDimxH0Wm9QKwqbH486ySW47__SJO ****@yahoo.com mobile +947123452 [info] => Array ( [url] => https://api.linkedin.com/v1/people/~:(id,first-name,last-name,picture-url,email-address,phone-numbers) [content_type] => text/xml;charset=UTF-8 [http_code] => 200 [header_size] => 205 [request_size] => 500 [filetime] => -1 [ssl_verify_result] => 20 [redirect_count] => 0 [total_time] => 1.482 [namelookup_time] => 0 [connect_time] => 0.374 [pretransfer_time] => 1.076 [size_upload] => 0 [size_download] => 538 [speed_download] => 363 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 1.466 [redirect_time] => 0 ) [oauth] => Array ( [header] => Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="a484c4f1360fce43994eac522452b3b1",oauth_timestamp="1375865879",oauth_consumer_key="dxmlx1mg2xoz",oauth_token="70b05d77-fa98-49eb-bada-4be9d8533f29",oauth_signature_method="HMAC-SHA1",oauth_signature="05UWwjC1jC7lZT%2BBa8nWk8Isiz8%3D" [string] => GET&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~%3A%28id%2Cfirst-name%2Clast-name%2Cpicture-url%2Cemail-address%2Cphone-numbers%29&oauth_consumer_key%3Ddxmlx1mg2xoz%26oauth_nonce%3Da484c4f1360fce43994eac522452b3b1%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1375865879%26oauth_token%3D70b05d77-fa98-49eb-bada-4be9d8533f29%26oauth_version%3D1.0 ) [success] => 1 )
これがあなたのサポートに感謝するものであることを願っています