當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Facebook::get_facebook_url方法代碼示例

本文整理匯總了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);
 }
開發者ID:robertfoleyjr,項目名稱:robertfoleyjr-d6,代碼行數:10,代碼來源:facebook_mobile.php

示例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 
        }
    }
開發者ID:BGCX067,項目名稱:facebook-zooomr-rss-reader-svn-to-git,代碼行數:56,代碼來源:facebookapi_php5_restlib.php5

示例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');
 }
開發者ID:kennethreitz-archive,項目名稱:salsa,代碼行數:13,代碼來源:facebookapi_php5_restlib.php


注:本文中的Facebook::get_facebook_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。