CurlFile and the Facebook SDK in PHP 5.5
One of the features implemented in PHP 5.5 was CurlFile, a nice addition to the Curl extension to allow you to specify specific arguments as a file for upload.
In previous versions (pre-PHP 5.5) the syntax looked like this:
$facebook->api("/me/photos", 'POST&