Sunday, 11 August 2013

Uploading picture to FB Open Graph error curl_setopt_array(): The usage of the @filename API for file uploading is deprecated

Uploading picture to FB Open Graph error curl_setopt_array(): The usage of
the @filename API for file uploading is deprecated

This use to work however it seems since PHP 5.5 I am no longer able to use
this piece of code to upload a picture to facebook staging ressources
$provider->api()->setFileUploadSupport(true);
$service = $provider->api()->api('/me/staging_resources',
'POST',
array('access_token' => $provider->api()->getAccessToken(),
'file' => '@' . realpath($image_path) . ';type=image/jpeg'
)
);
It gives me
curl_setopt_array(): The usage of the @filename API for file uploading is
deprecated
How can I fix this?

No comments:

Post a Comment