hi,
the Facebook Graph API exposes a function to upload a photo to a user’s album…
you can see PHP examples here
http://forum.developers.facebook.net/viewtopic.php?pid=291678
the Graph API doc for upload is here
http://developers.facebook.com/docs/reference/api/photo/
Publishing
Requires the publish_stream permission.
To publish a photo, issue a POST request with the photo file attachment as multipart/form-data.
You can publish an individual photo to a user profile with a POST to
http://graph.facebook.com/PROFILE_ID/photos
We automatically create an album for your application if it does not
already exist. All photos from your application will be published to the same automatically created album.
You can publish a photo to a specific, existing photo album with a POST to http://graph.facebook.com/ALBUM_ID/photos.
curl -F ‘access_token=…’ <br> -F ‘source=@file.png’ <br> -F ‘message=Caption for the photo’ <br> https://graph.facebook.com/me/photos
here is another example using PHP
[php]
$data = array(
basename($row[‘file_location’]) => “@”.realpath($row[‘file_location’]),
“message” => $row[‘description’],
“uid” => PAGE_ID,
“access_token” => ACCESS_TOKEN
);
$ch = curl_init();
$url = “https://graph.facebook.com/GRAPH_ALBUM_ID/photos”;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$op = curl_exec($ch);
curl_close($ch);
[/php]
thanks for any suggestions
j [import]uid: 6645 topic_id: 5642 reply_id: 305642[/import]