本文整理汇总了PHP中Facebook::get_facebook_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::get_facebook_url方法的具体用法?PHP Facebook::get_facebook_url怎么用?PHP Facebook::get_facebook_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook
的用法示例。
在下文中一共展示了Facebook::get_facebook_url方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create the client.
* @param string $session_key if you haven't gotten a session key yet, leave
* this as null and then set it later by just
* directly accessing the $session_key member
* variable.
*/
public function __construct($api_key, $secret, $session_key = null)
{
$this->secret = $secret;
$this->session_key = $session_key;
$this->api_key = $api_key;
$this->last_call_id = 0;
$this->server_addr = Facebook::get_facebook_url('api') . '/restserver.php';
if ($GLOBALS['facebook_config']['debug']) {
$this->cur_id = 0;
?>
<script type="text/javascript">
var types = ['params', 'xml', 'php', 'sxml'];
function toggleDisplay(id, type) {
for each (var t in types) {
if (t != type || document.getElementById(t + id).style.display == 'block') {
document.getElementById(t + id).style.display = 'none';
} else {
document.getElementById(t + id).style.display = 'block';
}
}
return false;
}
</script>
<?php
}
}
开发者ID:ngerakines,项目名称:facebook_application_development_wrox,代码行数:33,代码来源:facebookapi_php5_restlib.php
示例2: get_www_url
public function get_www_url($action, $params)
{
$page = parent::get_facebook_url('www') . '/' . $action;
foreach ($params as $key => $val) {
if (!$val) {
unset($params[$key]);
}
}
return $page . '?' . http_build_query($params);
}
示例3: __construct
/**
* Create the client.
* @param string $session_key if you haven't gotten a session key yet, leave
* this as null and then set it later by just
* directly accessing the $session_key member
* variable.
*/
public function __construct($api_key, $secret, $session_key = null, $server_addr = null)
{
$this->secret = $secret;
$this->session_key = $session_key;
$this->api_key = $api_key;
$this->batch_mode = FacebookRestClient::BATCH_MODE_DEFAULT;
$this->last_call_id = 0;
if ($server_addr) {
$this->server_addr = $server_addr;
} else {
$this->server_addr = Facebook::get_facebook_url('api') . '/restserver.php';
}
if (!empty($GLOBALS['facebook_config']['debug'])) {
$this->cur_id = 0;
?>
<script type="text/javascript">
var types = ['params', 'xml', 'php', 'sxml'];
function getStyle(elem, style) {
if (elem.getStyle) {
return elem.getStyle(style);
} else {
return elem.style[style];
}
}
function setStyle(elem, style, value) {
if (elem.setStyle) {
elem.setStyle(style, value);
} else {
elem.style[style] = value;
}
}
function toggleDisplay(id, type) {
for (var i = 0; i < types.length; i++) {
var t = types[i];
var pre = document.getElementById(t + id);
if (pre) {
if (t != type || getStyle(pre, 'display') == 'block') {
setStyle(pre, 'display', 'none');
} else {
setStyle(pre, 'display', 'block');
}
}
}
return false;
}
</script>
<?php
}
}
示例4: video_upload
/**
* Uploads a video.
*
* @param string $file The location of the video on the local filesystem.
* @param string $title (Optional) A title for the video. Titles over 65 characters in length will be truncated.
* @param string $description (Optional) A description for the video.
*
* @return array An array with the video's ID, title, description, and a link to view it on Facebook.
*/
public function video_upload($file, $title = null, $description = null)
{
return $this->call_upload_method('facebook.video.upload', array('title' => $title, 'description' => $description), $file, Facebook::get_facebook_url('api-video') . '/restserver.php');
}