【问题标题】:how to fetch facebook event from event id in code ingnator?如何从codeigniter中的事件ID获取facebook事件?
【发布时间】:2014-10-15 17:10:28
【问题描述】:

我有以下查询从 facebook 获取事件:

$fb_events = $this->facebook->api('/me/events?fields=name,start_time,timezone,location,id,description,cover,picture,venue&limit=1');

但我想从我尝试过的事件 id 中获取:

$fb_events = $this->facebook->api('/$event_id/?fields=name,start_time,timezone,location,id,description,cover,picture,venue&limit=1');

但它不起作用

【问题讨论】:

    标签: facebook codeigniter facebook-graph-api facebook-events


    【解决方案1】:

    试试这个:

    $fb_events = $this->facebook->api('/' . $event_id . '/?fields=name,start_time,timezone,location,id,description,cover,picture,venue');
    

    当然,如果您想获取非公开活动的详细信息,您需要授权受邀用户。以下是使用 PHP SDK 执行此操作的方法:https://developers.facebook.com/docs/php/gettingstarted/4.0.0

    【讨论】:

    • 这很好,谢谢,但不适用于非公开活动。我收到错误。如何避免这种情况?
    • 为此,您需要授权被邀请的用户。我将添加一个链接到我的答案。
    猜你喜欢
    • 1970-01-01
    • 2018-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-25
    • 1970-01-01
    相关资源
    最近更新 更多