本文整理汇总了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;
}
示例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";
}
示例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';