0
我在添加图片到FB事件时遇到问题。要创建活动,我使用FB PHP SDK。Facebook Open Graph PHP SDK事件图片
这里是代码:
$fb_config = array(
'appId' => 'xxx',
'secret' => 'xxx',
'fileUpload' => true
);
$facebook = new Facebook($fb_config);
$facebook->setFileUploadSupport(true);
$access_token = get_option('facebook_token');
$facebook->setAccessToken($access_token);
$eventInfo = array(
'fields'=>'name,picture,start_time,description',
'name' => 'Event name',
'start_time' => 'Start Date',
'end_time' => 'End Date',
'description' => 'Event Desc',
'picture' => 'http:// link to the image on the same server as provided on the app conf page.'
);
$result = $facebook->api(
'/fb_page_id/events',
'post',
$eventInfo
);
print_r($result); // {id: fb_event_id }
与此代码事件造成罚款,但事件的图片丢失。当我使用相同字段的Facebook Graph Api explorer工具时,图片也不存在。
感谢您的帮助!通过卷曲
哈马德,谢谢! –