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


PHP AppConfig::GetAppId方法代码示例

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


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

示例1: ShowLoginDialog

function ShowLoginDialog($facebook)
{
    $facebook->setAccessToken(null);
    $cookieName = 'fbsr_' . AppConfig::GetAppId();
    setcookie($cookieName, "", 1);
    $loginUrl = $facebook->getLoginUrl(array('canvas' => 1, 'fbconnect' => 0, 'req_perms' => 'email'));
    $redirectScript = "<script type=\"text/javascript\">\n";
    $redirectScript .= "if (parent != self) \n";
    $redirectScript .= "top.location.href = \"" . $loginUrl . "\";\n";
    $redirectScript .= "else self.location.href = \"" . $loginUrl . "\";\n";
    $redirectScript .= "</script>";
    echo $redirectScript;
}
开发者ID:evinw,项目名称:project_yess,代码行数:13,代码来源:index.php

示例2: UseGraphAPI

/**
 * Call this function after <body> tag on each page to enable GraphAPI JavaScript SDK.
 * You can find all language codes at:
 * http://www.facebook.com/translations/FacebookLocales.xml
 */
function UseGraphAPI($languageCode = "en_US")
{
    echo "<div id='fb-root'></div>\n";
    echo "<script>\n";
    echo "var graphApiInitialized = false;\n";
    echo "  window.fbAsyncInit = function() {\n";
    echo "    FB.init({\n";
    echo "      appId  : '" . AppConfig::GetAppId() . "',\n";
    echo "      status : true, // check login status\n";
    echo "      cookie : true, // enable cookies to allow the server to access the session\n";
    echo "      xfbml  : true,  // parse XFBML\n";
    echo "      oauth: true";
    echo "    });\n";
    echo "    graphApiInitialized = true;\n";
    echo "  };\n";
    echo "  (function() {\n";
    echo "    var e = document.createElement('script');\n";
    echo "    e.src = document.location.protocol + '//connect.facebook.net/" . $languageCode . "/all.js';\n";
    echo "    e.async = true;\n";
    echo "    document.getElementById('fb-root').appendChild(e);\n";
    echo "  }());\n";
    echo "</script>\n";
}
开发者ID:evinw,项目名称:project_yess,代码行数:28,代码来源:GraphApi.php

示例3: Exception

<?php

if ($_SERVER["SERVER_NAME"] == "localhost") {
    Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = false;
    Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;
}
require_once 'AppConfig.php';
if (AppConfig::GetAppId() == null) {
    throw new Exception("AppId key is not set. Please edit AppConfig.php file and set value from your application");
}
if (AppConfig::GetSecret() == null) {
    throw new Exception("App secret key is not set. Please edit AppConfig.php file and set value from your application");
}
if (AppConfig::GetAppName() == null) {
    throw new Exception("App name is not set. Please edit AppConfig.php file and set value from your application");
}
if (AppConfig::GetAppCanvasUrl() == null) {
    throw new Exception("App Canvas URL is not set. Please edit AppConfig.php file and set value from your application");
}
require_once 'GraphApi.php';
require_once 'LoginButton.php';
require_once 'RequestDialog.php';
require_once 'InviteFriends.php';
require_once 'InviteFriendsCondensed.php';
require_once 'StreamPublish.php';
require_once 'Permissions.php';
require_once 'LikeButton.php';
require_once 'SendButton.php';
require_once 'LikeBox.php';
require_once 'Comments.php';
require_once 'Bookmark.php';
开发者ID:evinw,项目名称:project_groupad_codeignitor,代码行数:31,代码来源:faceconn.php


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