Facebook api不上传图片

My issue is already discussed here couldn't open file "" error in Facebook PHP API

and my php script is

//variables we are going to post to facebook
$fbPermissions = 'publish_stream,user_photos';  //Required facebook permissions
$PicLocation = 'fb_cover_images/cover7.jpg';
$msg_body = array(
    'message' => 'I liked this pic from '. $homeurl .
     ' it is perfect for my cover photo.',
     'url' => "http://my_site.com/$PicLocation"
);

if ($fbuser){ //user is logged in to facebook, post our image
  try {
     $uploadPhoto = $facebook->api('/me/photos', 'post', $msg_body );
  } 
  catch (FacebookApiException $e) {
    echo $e->getMessage(); //output any error
  }
}
else{
  $loginUrl = $facebook->getLoginUrl(
  array('scope'=>$fbPermissions,'return_url'=>$return_url));
  header('Location: ' . $loginUrl);
}

If I set 'url' => "http://my_site.com/$PicLocation" then getting

(#200) Permissions error

and If I set 'url' => "@http://my_site.com/$PicLocation" then getting

couldn't open file "http://my_site.com/fb_cover_images/cover7.jpg"

message though if I hit "http://my_site.com/fb_cover_images/cover7.jpg", I can view image and permission to folder+image is set to 777.

Please guide what I am doing wrong.... I have searched but fail.

I also tried [PHP + Facebook: how to upload photo on the wall? but same rubbish message (#200) Permissions error

Also Upload Photo To Album with Facebook's Graph API I don't know what the hell is going on with FB API.

Try adding the following line to the top of your code, after setting up Facebook:

$facebook->setFileUploadSupport( true );

Then, change your $msg_body to the following:

$msg_body = array(
  'name' => 'I liked this pic from '. $homeurl . ' it is perfect for my cover photo.',
  'source' => "http://my_site.com/$PicLocation"
);

The name is the caption for the image, and the source is the URL to the file. You only need to prefix @ to the source if you are referencing a local file.