本文整理汇总了PHP中Facebook::getAppID方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::getAppID方法的具体用法?PHP Facebook::getAppID怎么用?PHP Facebook::getAppID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook
的用法示例。
在下文中一共展示了Facebook::getAppID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialchars
print htmlspecialchars(print_r($user_profile, true));
?>
</pre>
<?php
} else {
?>
<fb:login-button></fb:login-button>
<?php
}
?>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: '<?php
echo $facebook->getAppID();
?>
',
cookie: true,
xfbml: true,
oauth: true
});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
FB.Event.subscribe('auth.logout', function(response) {
window.location.reload();
});
};
(function() {
var e = document.createElement('script'); e.async = true;
示例2: Facebook
$fbObj = new Facebook($mysqli);
$pluginObj->selectByName("Facebook Login");
if ($_POST['submit']) {
$arrAPIKey = array('appID' => $_POST['appid'], 'appSecret' => $_POST['appsecret']);
$jsonAPIKey = json_encode($arrAPIKey);
if ($pluginObj->update(array("apikey"), array($jsonAPIKey))) {
echo "\n\t\t\t\t<div style='display: none' id='successBox'>\n\t\t\t\t<p align='center'>\n\t\t\t\tSuccessfully Saved Facebook Login Settings!\n\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\tpopupDialog('Facebook Login', '" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "', 'successBox');\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t";
$member->logAction("Changed Facebook Login Plugin Settings.");
} else {
$countErrors++;
$dispError .= " <b>·</b> Unable to save information to database! Please contact the website administrator.<br>";
}
}
if (!$_POST['submit']) {
$dispNote = "";
$arrFacebookAPIKeys = array("App ID" => $fbObj->getAppID(), "App Secret" => $fbObj->getAppSecret());
foreach ($arrFacebookAPIKeys as $key => $value) {
if ($value == "") {
$dispNote .= " <b>·</b> " . $key . "<br>";
}
$dispFacebookAPIKey[$key] = filterText($value);
}
echo "\n\t\t\t<p align='right' style='margin-bottom: 10px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Return to Plugin Manager</a></p>\n\t\t\t\n\t\t\t<form action='" . $MAIN_ROOT . "plugins/facebook/settings.php' method='post'>\n\t\t\t<div class='formDiv'>\n\t\t\n\t\t\t";
if ($dispError != "") {
echo "\n\t\t\t\t<div class='errorDiv'>\n\t\t\t\t<strong>Unable to save Facebook Login settings because the following errors occurred:</strong><br><br>\n\t\t\t\t{$dispError}\n\t\t\t\t</div>\n\t\t\t\t";
}
if ($dispNote != "") {
echo "\n\t\t\t\t\t<div class='errorDiv'>\n\t\t\t\t\t\t<strong><u>NOTE:</u> In order for Facebook Login to work you must set the following variables in the facebook.php plugin file.</strong><br><br>\n\t\t\t\t\t\t" . $dispNote . "\n\t\t\t\t\t</div>\n\t\t\t\t";
}
echo "\n\t\t\t\t\n\t\t\t\tYour Facebook Login plugin settings are listed below. You must set App ID and App Secret in order for the plugin to work properly.\n\t\t\n\t\t\t\t<table class='formTable'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>App ID:</td>\n\t\t\t\t\t\t<td class='main'><input type='text' name='appid' class='textBox' value='" . $dispFacebookAPIKey['App ID'] . "'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='formLabel'>App Secret:</td>\n\t\t\t\t\t\t<td class='main'><input type='text' name='appsecret' class='textBox' value='" . $dispFacebookAPIKey['App Secret'] . "'></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class='main' align='center' colspan='2'><br>\n\t\t\t\t\t\t\t<input type='submit' name='submit' value='Save Settings' class='submitButton'>\n\t\t\t\t\t\t</td>\n\t\t\t\t</table>\n\t\n\t\t\t</div>\n\t\t\t</form>\n\t\t\t<p align='right' style='margin-bottom: 20px; margin-right: 20px;'>« <a href='" . $MAIN_ROOT . "members/console.php?cID=" . $cID . "'>Return to Plugin Manager</a></p>\n\t\t";
}