当前位置: 首页>>代码示例>>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;未经允许,请勿转载。