Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 357 Bytes
<?php
require_once 'config.php';
$img = realpath("C:\\path\\to\\file.jpg");
// allow uploads
$facebook->setFileUploadSupport("http://" . $_SERVER['SERVER_NAME']);
// add a status message
$photo = $facebook->api('/me/photos', 'POST',
array(
'source' => '@' . $img,
'message' => 'This photo came from my app.'
)
);
var_dump($photo);
You can’t perform that action at this time.