I’ve an issue uploading image while creating a facebook graph event for a page. This code was in production and was working correctly until it stopped working on the 27th of March at 2PM.
I installed the latest facebook api. The test sample I had done didn’t work anymore either.
I’ve look at the developer roadmap, but didn’t found anything.
The error I got is :
Fatal error: Uncaught OAuthException: (#324) Missing or invalid image file thrown in C:\devel\www\create_fb_events\php-sdk\src\base_facebook.php on line 1106
My code is :
$facebook = new Facebook(array(
'access_token' => $accessToken,
'appId' => $appId,
'secret' => $secret,
'fileUpload' => true
));
$e = $facebook->api('/'.$appId.'/events', "post", array('file.png' => '@' . realpath('C:\devel\www\create_fb_events\Elephant-icon.png').";type=image/png", 'name'=>'test9', 'description'=>'', 'start_time'=>time(), 'end_time'=>time()+5000, 'location'=>'some_place', 'privacy_type'=>'SECRET'));
Does someone has a clue ?
I am not encountering this error but I am using the same or similiar techniques. It appears that you are not alone, though: