本文整理汇总了PHP中FB::get方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::get方法的具体用法?PHP FB::get怎么用?PHP FB::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FB
的用法示例。
在下文中一共展示了FB::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_menu
<?php
include_once 'client/facebook.php';
include_once 'lib.php';
include_once 'config.php';
$fb = FB::get($api_key, $secret);
//$friends = $fb->api_client->friends_get();
$user = $_POST['fb_sig_user'];
$friends = explode(",", $_POST['fb_sig_friends']);
if (isset($_POST['what'])) {
$who = $user;
$what = $_POST['what'];
$description = $_POST['description'];
$value = $_POST['value'];
$available = (bool) false;
if ($_POST['available'] == 1) {
$available = (bool) true;
}
add_shared_item($who, $what, $description, $value, $available);
$render_msg = (bool) true;
}
echo render_menu("my_listings", $user, $friends);
echo render_tabs(0);
if ($render_msg) {
?>
<fb:success>
<fb:message>Your shared item has been added.</fb:message>
</fb:success>
<?php
}
?>
示例2: facebook_page_fans
function facebook_page_fans($pid)
{
$qry = FB::get()->api(array('method' => 'fql.query', 'query' => 'SELECT fan_count FROM page WHERE page_id = ' . $pid));
return (int) $qry[0]["fan_count"];
}