0

我试图弄清楚如何 rsvp 到事件,我能够连接并进入我的主页,然后根据以下代码添加“rsvp_event”权限: https ://developers.facebook.com/docs/参考/api/事件/#attending

不知道为什么它给了我错误。

//check if the permissions we need have been allowed by the user
//if not then redirect them again to facebook's permissions page
$permissions_needed = array('publish_stream', 'read_stream', 'manage_pages', 'create_event','rsvp_event');
foreach($permissions_needed as $perm) {
    if( !isset($permissions_list['data'][0][$perm]) || $permissions_list['data'][0][$perm] != 1 ) {
        $login_url_params = array(
            'scope' => 'publish_stream,read_stream,manage_pages',
            'fbconnect' =>  1,
            'display'   =>  "page",
            'next' => 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
        );
        $login_url = $facebook->getLoginUrl($login_url_params);
        header("Location: {$login_url}");
        exit();
    }
}
4

1 回答 1

1

尝试使用这行代码来证明您的应用将来不会发生变化:

'scope' => implode(',', $permissions_needed),
于 2013-01-18T18:31:44.133 回答