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


PHP Facebook::hasFacebook方法代码示例

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


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

示例1: Facebook

    exit;
} else {
    $memberInfo = $member->get_info_filtered();
    $consoleObj->select($_GET['cID']);
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
if (trim($_SERVER['HTTPS']) == "" || $_SERVER['HTTPS'] == "off") {
    $dispHTTP = "http://";
} else {
    $dispHTTP = "https://";
}
include_once "../plugins/facebook/facebook.php";
$fbObj = new Facebook($mysqli);
$blnCheckForFacebook = $fbObj->hasFacebook($memberInfo['member_id']);
if ($blnCheckForFacebook) {
    $fbInfo = $fbObj->get_info_filtered();
    $fbID = $fbInfo['fbconnect_id'];
    if (time() - $fbInfo['lastupdate'] > 1800) {
        $fbObj->accessToken = $fbInfo['access_token'];
        $fbInfo = $fbObj->getFBInfo();
        if ($fbInfo == "") {
            // User revoked access through Facebook, refresh page and re-ask for access
            $fbObj->delete();
            echo "\n\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\n\t\t\t\t\twindow.location = '" . $MAIN_ROOT . "members/console.php?cID=" . $_GET['cID'] . "';\n\t\t\t\t\n\t\t\t\t</script>\n\t\t\t\n\t\t\t";
            exit;
        }
        $arrColumns = array("name", "lastupdate");
        $arrValues = array($fbInfo['name'], time());
        $fbObj->select($fbID);
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:facebookconnect.php

示例2: Member

<?php

/*
 * Bluethrust Clan Scripts v4
 * Copyright 2014
 *
 * Author: Bluethrust Web Development
 * E-mail: support@bluethrust.com
 * Website: http://www.bluethrust.com
 *
 * License: http://www.bluethrust.com/license.php
 *
 */
include_once "../../_setup.php";
include_once "../../classes/member.php";
$prevFolder = "../../";
include "facebook.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$fbObj = new Facebook($mysqli);
if ($member->authorizeLogin($_SESSION['btPassword']) && $fbObj->hasFacebook($member->get_info("member_id"))) {
    $fbObj->accessToken = $fbObj->get_info_filtered("access_token");
    $fbObj->getFBInfo();
    $fbObj->delete();
    echo "\n\t\t\n\t\t<div class='shadedBox' style='width: 50%; margin-left: auto; margin-right: auto'>\n\t\t\n\t\t\t<p align='center' class='main' style='padding: 20px'>\n\t\t\t\tSuccessfully disconnected your Facebook account!<br><br>\n\t\t\t\t<a href='" . $MAIN_ROOT . "members'>Return to My Account</a>\n\t\t\t</p>\n\t\t\n\t\t</div>\n\t\n\t";
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:26,代码来源:disconnect.php


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