本文整理汇总了PHP中FB::getAppToken方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::getAppToken方法的具体用法?PHP FB::getAppToken怎么用?PHP FB::getAppToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FB
的用法示例。
在下文中一共展示了FB::getAppToken方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: apprequests
public function apprequests()
{
Configure::write('Application.app_id', '141756772615202');
Configure::write('Application.app_secret', '6d9ab4dcf4d5c155ebf88737a28e449a');
// Can be \Facebook\User objects
$robert_nagency = new \Facebook\User('robert.nagency');
// Can be normal vanity usernames
$christian_winther = 'christian.winther';
// Can be IDs
$daniel_baek = '8648808';
// Setup our application we wish to invite people to
// Remember to setup canvas URLs for the application, or it will not work
$application = new \Facebook\Application('141756772615202', array('access_token' => FB::getAppToken()));
// Invite people to the app
$response = $application->apprequest(array($robert_nagency, $christian_winther, $daniel_baek), 'Demo App Invite');
debug($response);
}