本文整理匯總了PHP中SocialManager::readContentWithOpenGraph方法的典型用法代碼示例。如果您正苦於以下問題:PHP SocialManager::readContentWithOpenGraph方法的具體用法?PHP SocialManager::readContentWithOpenGraph怎麽用?PHP SocialManager::readContentWithOpenGraph使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SocialManager
的用法示例。
在下文中一共展示了SocialManager::readContentWithOpenGraph方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) - 1 : 0;
$length = isset($_REQUEST['length']) ? intval($_REQUEST['length']) : 10;
$userId = isset($_REQUEST['u']) ? intval($_REQUEST['u']) : api_get_user_id();
$friendId = $userId;
$array = SocialManager::getWallMessagesPostHTML($userId, $friendId, null, $length, $start);
if (!empty($array)) {
ksort($array);
$html = '';
for ($i = 0; $i < count($array); $i++) {
$post = $array[$i]['html'];
$comment = SocialManager::getWallMessagesHTML($userId, $friendId, $array[$i]['id']);
$html .= '<div class="panel panel-info"><div class="panel-body">' . $post . $comment . '</div></div>';
}
$html .= Display::div(Display::url(get_lang('SeeMore'), api_get_self() . '?u=' . $userId . '&a=listWallMessage&start=' . ($start + $length + 1) . '&length=' . $length, array('class' => 'nextPage')), array('class' => 'next'));
echo $html;
}
break;
// Read the Url using OpenGraph and returns the hyperlinks content
// Read the Url using OpenGraph and returns the hyperlinks content
case 'readUrlWithOpenGraph':
$url = isset($_POST['social_wall_new_msg_main']) ? $_POST['social_wall_new_msg_main'] : '';
$html = '';
if (SocialManager::verifyUrl($url) == true) {
$html = Security::remove_XSS(SocialManager::readContentWithOpenGraph($url));
}
echo utf8_decode($html);
break;
default:
echo '';
}
exit;