Code:
<fb:application-name />
<style>
a{cursor:pointer;color:#3b5998;-moz-outline-style:none;text-decoration:none}
a:hover{text-decoration:underline}
img{border:0}
html body {
margin:5px;
}
.buttonStyle {
width: auto !important;
padding: 2px 3px;
font-family: Tahoma;
font-weight: bold;
color: #FFF;
background-repeat: repeat-x;
background: #556FA8 url(btbgbl.png);
background-position: top;
overflow: visible;
border: 1px solid #29447E;
cursor: pointer;
}
.button2Style {
width: auto !important;
padding: 2px 3px;
font-family: Tahoma;
font-weight: bold;
color: #FFF;
background-repeat: repeat-x;
background: #69A74E url(btbggn.png);
background-position: top;
overflow: visible;
border: 1px solid #3B6E22;
cursor: pointer;
}
.buttonStyle:hover {
width: auto !important;
padding: 2px 3px;
font-family: Tahoma;
font-weight: bold;
color: #FFF;
background-repeat: repeat-x;
background: #556FA8;
background-position: top;
overflow: visible;
border: 1px solid #29447E;
}
.button2Style:hover {
width: auto !important;
padding: 2px 3px;
font-family: Tahoma;
font-weight: bold;
color: #FFF;
background-repeat: repeat-x;
background: #69A74E;
background-position: top;
overflow: visible;
border: 1px solid #3B6E22;
}
</style>
<?php
require_once 'data/facebook.php';
$appapikey = 'GANTI PUNYA LOE';
$appsecret = 'GANTI PUNYA LOE';
$facebook = new Facebook($appapikey, $appsecret);
//Special Permissions
$uid =
$facebook->require_login('read_stream,publish_stream,user_groups,user_status,friends_status,offline_access');
//get list of friends that use this app.
$userfriends = $facebook->api_client->friends_getAppUsers();
//get list of user's friends
$friends = $facebook->api_client->friends_get();
//detect if user is a fan of app. page
$pages = $facebook->api_client->pages_isFan(GANTI PUNYA LOE);
?>
<form action="like.php" target="_blank"
id="byname" method="post">
<fb:friend-selector name="uid"
idname="ambil"/></div><br/>
<input class="button2Style" type="submit"
value="Send Like by Friend selector" />
</form></div><br/>
LIKE.PHP
Code:
<?php
//file name: like.php
require_once 'data/facebook.php';
$appapikey = 'GANTI PUNYA LOE';
$appsecret = 'GANTI PUNYA LOE';
$facebook = new Facebook($appapikey, $appsecret);
//handling logic
if (isset($_POST['ambil'])){
$aydinya=$_POST['ambil'];
if ($aydinya == '') {
echo "<div
style=\"-moz-border-radius:5px;background-color:#FFEBE8;border:1px solid
#DD3C10;padding:10px;margin-bottom:10px;font-weight:bold;\">Baby you're
beautiful and theres nothing wrong with you I love you more then I did before..
but.. <span style=\"font-size:12px;\">You have entered NOTHING
in the name field.</span></div>";
} else {
$strim = $facebook->api_client->stream_get('',$aydinya,'','','20');
if(is_array($strim)) {
for ($i = 0; $i < count($strim[posts]); $i++) {
if($strim[posts][$i][likes][can_like] == true) {
$facebook->api_client->stream_addlike($strim[posts][$i][post_id]);
}
}
echo "<div
style=\"-moz-border-radius:5px;background-color:#FFF9D7;border:1px solid
#E2C822;padding:10px;margin-bottom:10px;font-weight:bold;\">MANTAP
GAN... ".count($strim[posts])." JEMPOL SUKSES TERIKIM <a
href=\"http://www.facebook.com/profile.php?id=".$aydinya."\"
target=\"_blank\"><fb:name
uid=\"".$aydinya."\" useyou=\"false\"
linked=\"false\"/>'s wall</a></div>";
}
}
}
?>
oke udah
selesai nie masalah hosting..
tinggal kalian ganti tulisan ini [GANTI PUNYA LOE]
sekarang untuk halaman canvas apps adalah : http:/hostinganloe.com/
dan biasanya... banyak yang lupa mengganti bagian ini
require_once 'data/facebook.php';
$appapikey = 'GANTI PUNYA LOE';
$appsecret = 'GANTI PUNYA LOE';
$facebook = new Facebook($appapikey, $appsecret);
thx...
Priviewnya : http://apps.facebook.com/aplikasi-dinding/