Here is the auto update status facebook script:
<?php
// curl setting
function send_post_curl($url, $postdata = “”) {
$ch = curl_init($url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$data = curl_exec ($ch);
curl_close ($ch);
return $data;
}
// to send to your friend, change "me" with your friennd UID Facebook
$fburl = ‘https://graph.facebook.com/me/feed’;
// ganti dengan kode token anda
$fbtoken = ‘YOUR TOKEN’;
// ubah pesan sesuai keinginan
$fbmsg = “YOUR MESSAGES”;
$fbpcurl = ‘access_token=’. $fbtoken;
$fbpcurl .= ‘&message=’. str_replace(‘&’, ‘and’, urlencode($fbmsg)) ;
$result = send_post_curl($fburl, $fbpcurl);
echo ‘Result: ‘. $result;
?>
Save the script above with *.php extension and then upload to your hosting and set cronjob to it.
Permanent link to this post (121 words, 0 images, estimated 29 secs reading time)