如何在php中将图像发布到facebook事件?
这是我的密码如何在php中将图像发布到facebook事件?,php,facebook,fbml,Php,Facebook,Fbml,这是我的密码 $event_info['name'] = $name2; $event_info['category'] = 1; $event_info['privacy_type'] = 'OPEN'; $event_info['subcategory'] = 1; $event_info['description'] = $description_new; //description for event //$event_info['host'] = $desc; //descriptio
$event_info['name'] = $name2;
$event_info['category'] = 1;
$event_info['privacy_type'] = 'OPEN';
$event_info['subcategory'] = 1;
$event_info['description'] = $description_new; //description for event
//$event_info['host'] = $desc; //description for event
//$event_info['host'] = 'You';
$event_info['location'] = $location;
$event_info['city'] = $city; //Must be a valid city name
$event_info['start_time'] = $newTime; //Converts time to UTC
$event_info['picture'] = "@http://static.eventful.com/images/small/I0-001/003/184/085-4.jpeg";
一切都是后,除了图像,我想创建事件与事件图像
如何做到这一点?您需要的是以下几点:
$fname="/tmp/foo.jpg";
$attachment = array(
'access_token' => $facebook->getAccessToken(),
'name' => '',
'description' => '',
'start_time' => '',
'link' => '',
'source'=> '@'.$fname
/*...*/
);
/*Send the data*/
$result = $facebook->api('/me/events', 'POST', $attachment);