Thanks to Adam, HYG the full code:
<?php
require_once("facebook.php");
$access_token = "Add_Your_Access_Token_here";
$facebook = new Facebook(array(
'appId' => 'Add_Your_App_ID_Here',
'secret' => 'Add_Your_App_Secret_Here',
'fileUpload' => true, // I put this as False in my original program and this was the reason for my early issues
'cookie' => true // enable optional cookie support
));
$facebook->setFileUploadSupport(true);
$file = "@".realpath("001.png"); //Put the file path here
$args = array(
"message" => "Photo Caption'"
"access_token" => $access_token,
"image" => $file
);
$data = $facebook->api('/me/photos', 'post', $args); //This is the line that made everything working fine, thanks to Adam
if ($data) print_r("success");
?>