在进行查询以获取事件详细信息时,我似乎在结果集中获得了场地名称而不是场地 ID。表结构是否发生了未经宣布的更改,或者我做错了什么。Graph API Explorer 提供了venue.id,但在我自己的网站中通过PHP SDK 使用FQL 时,它是我得到的venue.name。
继承人的代码:
$fql='{
"event_info": "SELECT name,description, pic_small,pic_big, eid,venue,location FROM event WHERE eid ='.$_GET['id'].'",
"event_venue":"SELECT name, username, page_id, location FROM page WHERE name IN (SELECT venue.id FROM #event_info)"
}';
$setup = array(
'method' => 'fql.multiquery',
'queries' => $fql,
'callback' => ''
);
$result = $facebook->api($setup);
这导致“event_venue”结果集为空。
这是转储:
Array
(
[0] => Array
(
[name] => event_info
[fql_result_set] => Array
(
[0] => Array
(
[eid] => 410351692336116
[venue] => Array
(
[name] => Boothill
)
[location] => Boothill
)
)
)
[1] => Array
(
[name] => event_venue
[fql_result_set] => Array
(
)
)
)