当前位置: 首页>>代码示例>>PHP>>正文


PHP Facebook::current_url方法代码示例

本文整理汇总了PHP中Facebook::current_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::current_url方法的具体用法?PHP Facebook::current_url怎么用?PHP Facebook::current_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Facebook的用法示例。


在下文中一共展示了Facebook::current_url方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_extended_permission_url

 /**
  * support both prompt_permissions.php and authorize.php for now.
  * authorized.php is to be deprecate though.
  */
 public function get_extended_permission_url($ext_perm, $next = null, $cancel_url = null)
 {
     $next = $next ? $next : parent::current_url();
     $cancel_url = $cancel_url ? $cancel_url : parent::current_url();
     return $this->get_m_url('authorize.php', array('api_key' => $this->api_key, 'ext_perm' => $ext_perm, 'next' => $next, 'cancel_url' => $cancel_url));
 }
开发者ID:robertfoleyjr,项目名称:robertfoleyjr-d6,代码行数:10,代码来源:facebook_mobile.php

示例2: testNetworkRedirect

 public function testNetworkRedirect()
 {
     $_SERVER['HTTP_HOST'] = 'localhost';
     $_SERVER['REQUEST_URI'] = '/web/url';
     $params = array('soc_session_key' => '', 'session_key' => 'session-key', 'user' => '10000', 'in_iframe' => 0, 'in_canvas' => 1, 'time' => time(), 'added' => 1, 'api_key' => 'api-key');
     $_GET =& $params;
     $_GET['fb_sig'] = Facebook::generate_sig($_GET, 'secret');
     foreach ($_GET as $key => $value) {
         if (strncmp($key, 'fb_sig', 6) === 0) {
             continue;
         }
         $_GET['fb_sig_' . $key] = $value;
         unset($_GET[$key]);
     }
     $ringside = new RedirectingClient('api-key', 'secret', 'http://localhost/web/url', 'http://localhost/server/url', 'http://localhost/social/url');
     $this->assertEquals('10000', $ringside->get_loggedin_user());
     $this->assertNull($ringside->get_network_id());
     $this->assertNull($ringside->get_network_user());
     $ringside->require_network_login();
     // Confirm that the client forced a redirect; we don't care what PHP thinks the current URL is
     $this->assertEquals('http://localhost/social/url/map.php?v=1.0&method=map&api_key=api-key&snid=&sid=10000&social_session_key=&session_key=session-key&next=' . urlencode(Facebook::current_url()) . '&canvas', $ringside->redirect);
 }
开发者ID:jkinner,项目名称:ringside,代码行数:22,代码来源:RingsideApiClientsTestCase.php


注:本文中的Facebook::current_url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。