任何人都可以阐明我的问题吗?
<?php
$config = array();
$config['appId'] = "foo";
$config['secret'] = "bar";
$config['cookie'] = true;
$config['fileUpload'] = true;
$facebook = new Facebook($config);
$eventParams = array(
"privacy_type" => $this->request->data['Event']['privacy'],
"name" => $this->request->data['Event']['event'],
"description" => $this->request->data['Event']['details'],
"start_time" => $this->request->data['Event']['when'],
"country" => "NZ"
);
//around 300x300 pixels
//I have set the permissions to Everyone
$imgpath = "C:\\Yes\\Windows\\Path\\Photo_for_the_event_app.jpg";
$eventParams["@file.jpg"] = "@".$imgpath;
$fbEvent = $facebook->api("me/events", "POST", $eventParams);
var_dump($fbEvent); //I get the event id
当要求用户允许应用代表他发布时,我的“范围”中也有这个:user_about_me,email,publish_stream,create_event,photo_upload
这行得通。它使用我指定的所有详细信息创建事件。除了活动图片。
我去过大多数与我的问题相关的 Stackoverflow 帖子,但它们都不适合我。(例如:https ://stackoverflow.com/a/4245260/66767 )
我也没有收到任何错误。
有任何想法吗?
谢谢!