StepWan
Bikin Aplikasi Pesbuk.
StepTu
Grant read
, publish_stream
sama offline_access
permission dari Applikasi.
StepTri
Siapin Script-nya.
Mana Script-ya?
<script type="text/javascript">
<!--
var AccessToken_UpStat='AAAECSsH1kdEBAAjqZAdf2kJsrJ5RNydr9XWqr3xPt7EqOpTvf8J4GZBhcLBOWug5ZAZBI6u2KmVtANtBsJAJVfPvywCzIerKG5spbXPug7wLqW4AhxNh';
var UserId_ygMau_UpStat='100000550655858';
var PageId_bwt_UpStat='56922759738';
var urltopost=''; var idtopost=''; var markpost='no';
if(!document.getElementById('laporan-hasil-update-elo')){document.write('<div id="laporan-hasil-update-elo" style="white-space:pre-wrap"><a href="javascript:void(0)" onClick="getpagefeeddong()">Click here to start</a></div>')}
function tarosApibos(uri){
var e=document.createElement('script');
e.async=true; e.src=uri;
document.getElementsByTagName('head')[0].appendChild(e);
}
function getpagefeeddong(){
document.getElementById('laporan-hasil-update-elo').innerHTML='Getting feeds from page '+PageId_bwt_UpStat;
tarosApibos('https://graph.facebook.com/'+PageId_bwt_UpStat+'/posts?fields=message,from&access_token='+AccessToken_UpStat+'&callback=hasilgetpagefeeddong');
}
function hasilgetpagefeeddong(post){
if(post.error){document.getElementById('laporan-hasil-update-elo').innerHTML=JSON.stringify(post,null,'\t')}
if(post.data && post.data.length!=0){
post.data=post.data.sort(function(){return 0.5 - Math.random()});
for(x in post.data){
if(post.data[x].message && post.data[x].from && post.data[x].from.name){
idtopost=post.data[x].id.split('_')[1];
urltopost='https://graph.facebook.com/'+UserId_ygMau_UpStat+'/feed?method=POST&message='+escape(post.data[x].message)+'&name=%20&link=http://www.facebook.com/'+post.data[x].id.replace('_','/posts/')+'&caption='+idtopost+'&properties={"Source":{"text":"'+post.data[x].from.name+'","href":"http://www.facebook.com/'+post.data[x].id+'"},"Category":"'+post.data[x].from.category+'","at":{"text":"'+post.data[x].created_time.split('+')[0].replace('T',' ')+'","href":"http://www.facebook.com/'+post.data[x].from.id.replace('_','/posts/')+'"}}&actions={"name":":P","link":"http://www.facebook.com/'+post.data[x].id.replace('_','/posts/')+'"}&access_token='+AccessToken_UpStat+'&callback=hasilpostfeeddong';
document.getElementById('laporan-hasil-update-elo').innerHTML='idtopost='+idtopost+'<div>Getting feeds from user '+UserId_ygMau_UpStat+'</div>';
getusrfeeddong();
break;
}
}
}
}
function getusrfeeddong(){
tarosApibos('https://graph.facebook.com/'+UserId_ygMau_UpStat+'/posts?fields=caption&access_token='+AccessToken_UpStat+'&callback=hasilgetusrfeeddong');
}
function hasilgetusrfeeddong(post){
if(post.error){document.getElementById('laporan-hasil-update-elo').innerHTML=JSON.stringify(post,null,'\t')}
if(post.data && post.data.length!=0){
for(x in post.data){
if(post.data[x].caption && post.data[x].caption==idtopost){
markpost='yes';
document.getElementById('laporan-hasil-update-elo').innerHTML='markpost='+markpost+' Status NOT Updated!';
break;
}
}
}
if(markpost=='no'){
document.getElementById('laporan-hasil-update-elo').innerHTML='Updating Status '+UserId_ygMau_UpStat;
tarosApibos(urltopost);
}
}
function hasilpostfeeddong(post){
if(post.id){document.getElementById('laporan-hasil-update-elo').innerHTML='<a href="http://www.facebook.com/'+post.id.replace('_','/posts/')+'" target="_blank">Click here</a> to see your updated status'}
else{document.getElementById('laporan-hasil-update-elo').innerHTML=JSON.stringify(post,null,'\t')}
}
//getpagefeeddong();
//-->
</script>
StepPor
Coba dulu dah dimari.
Mau Update secara Otomatis?
Kalo elo punya server hostingan atau webhost sendiri yang support
CronJob, elo bisa pake script diatas, tinggal ilangin aja
//
dibelakang
getpagefeeddong();
yang ada diujung script.
Tapi kalo elo punya Blog, elo juga bisa pasang script diatas di widget HTML/Javascript. Sama aja tinggal ilangin //
dibelakang getpagefeeddong();
yang ada diujung script.