1

Possible Duplicate:
PHP - Upload a web hosted photo to facebook album via Graph API

I know that you can use this code to upload to a users album

$facebook = new Facebook(array(  
  'appId'  => 'ID',  
  'secret' => 'SECRET',  
  'fileUpload' => true,  
  'cookie' => true // enable optional cookie support  
));  


$facebook->setFileUploadSupport(true);  

# File is relative to the PHP doc  
$file = "@".realpath("../../_images/stuff/greatness.jpg");  

$args = array(  
    'message' => 'Photo Caption',  
    "access_token" => "urtoken",  
    "image" => $file  
);  


$data = $facebook->api('/ALBUMID_GOES_HERE/photos', 'post', $args);
if ($data) print_r("success");

Now this always uploads from my server, is it somehow possible that facebook takes an image from an external URL like http://www.test.com/image.jpg instead of uploading it with my server?

Community
  • 1
  • 1
Matthias Dunnowa
  • 119
  • 1
  • 1
  • 12

0 Answers0