cpi*_*lko 5 php facebook facebook-fql facebook-graph-api
Facebook页面:http://facebook.com/getwellgabby/events/目前有8个活动.我可以看到他们.非管理员可以看到它们并可以加入它们.
但是,当我通过Graph API或FQL进行调用时,只返回4个未来事件.结果可以在这里看到:http://getwellgabby.org/events? raw = 1(滚动到底部以获得原始响应.)
FQL查询是:
SELECT eid, name, start_time, end_time, location, venue, description
FROM event WHERE eid IN ( SELECT eid FROM event_member WHERE uid = 213367312037345 ) AND end_time > now()
ORDER BY end_time asc
Run Code Online (Sandbox Code Playgroud)
检查通过Graph API返回的各个事件ID显示这些事件之间没有区别.但是,通过前端编辑它们时,它们会显示在不同的对话框中.
随后是两个样本事件.两者都是由同一页面管理员创建的.相隔24小时.第一个事件通过API/FQL调用正确显示.第二个没有.从前端开始,第二个事件的显示方式与第一个事件不同.
使用具有"create_event"特权的访问令牌,使用FB Graph API Expplorer工具返回以下数据.
报告正确:
{
"id": "344143808978921",
"owner": {
"name": "Get Well Gabby",
"category": "Non-profit organization",
"id": "213367312037345"
},
"name": "Get Well Gabby Day With The Reading Phillies",
"description": "Please join [truncated...]",
"start_time": "2012-06-10T13:30:00",
"end_time": "2012-06-10T16:30:00",
"location": "FirstEnergy Stadium",
"venue": {
"street": "1900 Centre Ave.",
"city": "Reading",
"state": "Pennsylvania",
"country": "United States",
"latitude": 40.357,
"longitude": -75.91434,
"id": "223424611014786"
},
"privacy": "OPEN",
"updated_time": "2012-04-25T14:22:57+0000",
"type": "event"
}
Run Code Online (Sandbox Code Playgroud)
没有正确报告:
{
"id": "128748077259225",
"owner": {
"name": "Get Well Gabby",
"category": "Non-profit organization",
"id": "213367312037345"
},
"name": "Get Well Gabby Day With The Wilmington Blue Rocks",
"description": "Get Well Gabby Day With [truncated...]",
"start_time": "2012-07-29T13:35:00",
"end_time": "2012-07-29T16:35:00",
"timezone": "America/New_York",
"location": "Frawley Stadium",
"venue": {
"id": "148306638522325"
},
"privacy": "OPEN",
"updated_time": "2012-04-25T18:11:35+0000",
"type": "event"
}
Run Code Online (Sandbox Code Playgroud)
请注意,未正确报告的事件的前端对话框将不接受其他场地信息.
您可以使用since和until来增加查询范围.
这是一个使用图形api资源管理器和搜索事件(显示未来事件)的示例 https://developers.facebook.com/tools/explorer/135669679827333/?method=GET&path=search%3Ftype%3Devent%26q%3Da%26limit%3D100 %26since%3DNOW%26until%3Dnext%20年
171535666239724/events?since=2010&until=now // all events since 2010 until now
171535666239724/events?since=now&until=2013 // all events from now until 2013
Run Code Online (Sandbox Code Playgroud)
对于图形API请求:直到,由于(Unix时间戳或通过的strtotime接受的任何日期http://php.net/manual/en/function.strtotime.php):https://graph.facebook.com/search?until =昨天&q =橙