本文整理汇总了PHP中Facebook::App方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::App方法的具体用法?PHP Facebook::App怎么用?PHP Facebook::App使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook
的用法示例。
在下文中一共展示了Facebook::App方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lang
<?php
if ($fbaccountDetails->getLastname() || $fbaccountDetails->getFirstname()) {
echo $fbaccountDetails->getLastname() . " " . $fbaccountDetails->getFirstname();
} else {
echo "Facebook User";
}
?>
</span>
<span class="postPreviewDetails">
<?php
echo lang("NOW");
?>
·
<?php
if ($fbaccount->UserFbAccountDefaultApp()) {
echo Facebook::App($fbaccount->UserFbAccountDefaultApp())->app_name;
} else {
echo lang("APP_NAME");
}
?>
</span>
<div class="clear"></div>
</div>
<p class="message"><span class="defaultMessage"></span></p>
<a href="#" class="previewPostLink">
<div class="previewLink"></div>
<div class="postDetails">
<p class="name">
<span class="defaultName"></span>
</p>
示例2: array
$validation = $validate->check($_POST, array('postInterval' => array('disp_text' => lang('POST_INTERVAL'), 'required' => true), 'language' => array('disp_text' => lang('LANGUAGE'), 'required' => true, 'inArray' => Language::GetAvailableLangs())));
if (Input::Get("email") != $user->data()->email) {
$validation = $validate->check($_POST, array('email' => array('disp_text' => lang('EMAIL'), 'required' => true, 'unique' => 'users', 'valid_email' => true)));
}
if (Input::Get("password")) {
$validation = $validate->check($_POST, array('password' => array('disp_text' => lang('PASSWORD'), 'min' => '6', 'max' => '32'), 'repassword' => array('disp_text' => lang('RE_ENTER_PASSWORD'), 'required' => true, 'matches' => 'password')));
}
if ($validation->passed()) {
try {
$db = DB::GetInstance();
$openGroupOnly = Input::Get("openGroupOnly") == "on" ? 1 : 0;
$uniquePost = Input::Get("uniquePost") == "on" ? 1 : 0;
$uniqueLink = Input::Get("uniqueLink") == "on" ? 1 : 0;
$user->UpdateOptions(array('postInterval' => Input::Get("postInterval"), 'openGroupOnly' => $openGroupOnly, 'lang' => Input::Get("language"), 'uniquePost' => $uniquePost, 'uniqueLink' => $uniqueLink, 'timezone' => Input::Get("timezone")));
// Update the default app for the current facebook account
if ($fb->App(Input::Get('postApp'))) {
$fbaccount->updateDefaultApp(Input::Get('postApp'));
}
// User must have admin permission to update the general settings
if ($user->HasPermission("admin")) {
Options::Update(array("users_can_register" => Input::Get("usersCanRegister") == "on" ? 1 : 0, "users_must_confirm_email" => Input::Get("usersMustConfirmEmail") == "on" ? 1 : 0, "sitename" => Input::Get("sitename")));
}
// Update email
if (Input::Get("email")) {
$user->update(array('email' => Input::get('email')), $user->data()->id);
}
// Update facebook user id
if (Input::Get("fbuserid")) {
$user->update(array('fbuserid' => Input::get('fbuserid')), $user->data()->id);
}
// Update password