本文整理汇总了PHP中Facebook::request方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::request方法的具体用法?PHP Facebook::request怎么用?PHP Facebook::request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook
的用法示例。
在下文中一共展示了Facebook::request方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mysqlSetup
<center>
<table cellspacing="0" cellpadding="0" width="750px">
<tr>
<td>
<?php
require_once '../func.php';
require_once '../vars.php';
require_once '../if/src/facebook.php';
try {
mysqlSetup($db);
$facebook = new Facebook(array('appId' => $iframe_appid, 'secret' => $iframe_appsecret, 'cookie' => true));
$user_id = $facebook->getUser();
$session = $facebook->getSession();
$has_permission = file_get_contents('https://api.facebook.com/method/users.hasAppPermission?ext_perm=user_about_me&access_token=' . $session['access_token'] . '&format=json');
if (!$has_permission || strripos($has_permission, 'error_code')) {
$facebook->request($facebook_iframe_canvas_page_url, 'publish_stream,email,create_event,read_stream,sms,rsvp_event,offline_access,read_friendlists,email' . ',user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_education_history' . ',friends_education_history,user_events,friends_events,user_groups,friends_groups,user_hometown,friends_hometown,user_interests' . ',friends_interests,user_likes,friends_likes,user_location,friends_location,user_notes,friends_notes,user_online_presence' . ',friends_online_presence,user_photo_video_tags,friends_photo_video_tags,user_photos,friends_photos,user_relationships' . ',friends_relationships,user_relationship_details,friends_relationship_details,user_religion_politics,friends_religion_politics' . ',user_status,friends_status,user_videos,friends_videos,user_website,friends_website,user_work_history,friends_work_history' . ',read_insights,read_mailbox,read_requests,read_stream,user_checkins,friends_checkins');
}
$results = mysql_query("SELECT transform_add.transform_add_id,\n\t\t\t\t\t\t\t\t transform_add.add_uid_a,\n\t\t\t\t\t\t\t\t transform_add.add_time,\n\t\t\t\t\t\t\t\t transform_add.social_path,\n\t\t\t\t\t\t\t\t transform_add.status\n\t\t\t\t\t\t\t\t from transform_add\n\t\t\t\t\t\t\t\t where transform_add.add_uid_b = {$user_id} AND\n\t\t\t\t\t\t\t\t \t transform_add.status = 0\n\t\t\t\t\t\t\t\t order by transform_add.add_time DESC", $db);
$div_counter = 0;
while ($row = mysql_fetch_array($results)) {
$div_counter++;
}
display_header_links_if($div_counter, $user_id);
} catch (Exception $e) {
echo 'Caught database exception: ', $e->getMessage(), "\n";
}
?>
</td>
</tr>
<div id="fb-root"></div>
<script>