0

I would like to know whether it is possible to create a PHP script to copy images from a folder on my server to Facebook. I only managed to upload one image from a php script to my desired album. I would like now instead like to copy image files onto a desired album.

Is there any literature available to guide me.

maltadolls
  • 191
  • 2
  • 11
  • 1
    Take a look at this thread, it explains it for you. http://stackoverflow.com/questions/2718610/upload-photo-to-album-with-facebooks-graph-api – Anujan Mar 24 '13 at 16:45

1 Answers1

0

Yes, you can send request Facebook API to upload locally stored photos. Of course in context of your album (created previously).

$facebook->setFileUploadSupport(true);
$args = array('message' => 'Photo Caption');
$args['image'] = '@' . realpath($FILE_PATH);

$data = $facebook->api('/me/photos', 'post', $args);
print_r($data);
Athlan
  • 6,389
  • 4
  • 38
  • 56
  • 1
    Probably just best to link to the [original post](http://stackoverflow.com/a/3006867/472495) in the comments `:)`. – halfer Mar 24 '13 at 21:54