我有一个从Facebook粉丝页面中提取事件的php页面。如果我打开隐身窗口(或退出Facebook),然后单击该链接,将打开一个空白页面。我猜这与访问令牌,FB应用程序的权限和页面权限有关。任何见解将不胜感激。
ticket_uri尝试打开如下链接:http://www.facebook.com/ajax/events/ticket.php?event_id=147884225370550&action_source=12。如果登录,似乎会自动转发到事件中的实际故障单链接。
以下是我正在处理的页面:http://danagould.com/live.php。它正在从facebook页面官方文件中拉出来
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<?php
date_default_timezone_set('America/Los_Angeles');
//requiring FB PHP SDK
require 'fb-sdk/src/facebook.php';
//initializing keys
$facebook = new Facebook(array(
'appId' => 'MYAPPID',
'secret' => 'MYAPPSECRET',
'cookie' => true, // enable optional cookie support
));
$fql = "SELECT name, pic, start_time, end_time, location, description, eid, has_profile_pic, venue, ticket_uri
FROM event WHERE eid IN ( SELECT eid FROM event_member WHERE uid = 175890419184371 AND start_time > now() )
ORDER BY start_time asc";
$param = array(
'method' => 'fql.query',
'query' => $fql,
'callback' => ''
);
$fqlResult = $facebook->api($param);
//looping through retrieved data
foreach( $fqlResult as $keys => $values ){
$convertedtime = strtotime($values['start_time']);
$start_date = date( 'F j', $convertedtime );
$content = $values['description'];
//printing the data
echo "<tr>";
echo "<td width='8%'>";
if ( $values['has_profile_pic'] == FALSE) {
echo "<img src=img/spacer.gif width='100%'/>";
} else {
echo "<img src={$values['pic']} width='100%'/>";
}
echo "</td>";
echo "<td width='2%'></td>";
echo "<td width='18%' class='tourdate'>{$start_date}</td>";
echo "<td width='49%'>";
echo "<table><tbody><tr><td class='tourlocation'>{$values['name']}</td></tr>";
echo "<tr><td class='poddesc'><p class='poddesc'>At {$values['location']}</p></td></tr></tbody></table>";
echo "<td width='23%' class='getickets'>";
echo "<a href = " . $values['ticket_uri'] . ">Get Tickets</a>";
echo "</td></tr>";
echo "<tr height='5px'></tr>";
}
?>
</tbody>
</table>
答案 0 :(得分:0)
尝试将Cookie设置为false或全局设置$ fql。另外你在回调中说的是什么