It's my first question on stackoverflow. I made this application and it works fine for posting a photo to a user's wall once he visit the app page, But what I really want is to post many photos in a scheduled way (at a specific time like 12 Feb 2013 10:00 pm) to his wall and all users wall
I made a MySQL database that contains a table for users' ID, and a table for posts' info and time.
What can I do next?
include ("../facebook/facebook.php") ;
$facebook = new Facebook(array(
'appId' => APP_ID ,
'secret' => APP_SECRET ,
'fileUpload' => true,
));
$user = $facebook->getUser();
if ($user) {
try {
$user_profile = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
if ($user) {
$facebook->setFileUploadSupport(true);
$photo ="images/image1.jpg" ;
$message= "My message ";
$ret_obj = $facebook->api('/me/photos', 'post', array(
'source' => '@' . $photo,
'message' => $message,
)
);
$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'read_stream, publish_stream, photo_upload')
);
}