本文整理汇总了PHP中LinkedIn::connections方法的典型用法代码示例。如果您正苦于以下问题:PHP LinkedIn::connections方法的具体用法?PHP LinkedIn::connections怎么用?PHP LinkedIn::connections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LinkedIn
的用法示例。
在下文中一共展示了LinkedIn::connections方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SimpleXMLElement
$response = $OBJ_linkedin->statistics();
if ($response['success'] === TRUE) {
$response['linkedin'] = new SimpleXMLElement($response['linkedin']);
echo "<pre>" . print_r($response['linkedin'], TRUE) . "</pre>";
} else {
// statistics retrieval failed
echo "Error retrieving network statistics:<br /><br />RESPONSE:<br /><br /><pre>" . print_r($response) . "</pre>";
}
?>
<hr />
<h3 id="network_connections">Your Connections:</h3>
<?php
$response = $OBJ_linkedin->connections('~/connections:(id,first-name,last-name,picture-url)?start=0&count=' . CONNECTION_COUNT);
if ($response['success'] === TRUE) {
$connections = new SimpleXMLElement($response['linkedin']);
if ((int) $connections['total'] > 0) {
?>
<p>First <?php
echo CONNECTION_COUNT;
?>
of <?php
echo $connections['total'];
?>
total connections being displayed:</p>
<form id="linkedin_cmessage_form" action="<?php
echo $_SERVER['PHP_SELF'];
?>