HTML ve JS nizi Bu Şekilde Düzenleyiniz Hocam.. js link kısımlarını kendi linklerinize göre düzenleyin..
Kolaygelsin..
<?php
$tweet = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$username."&count=10");
foreach ($tweet as $ayikla)
{
echo'<article class="box is-post">';
echo '<b>'.$ayikla->text.'</b>'; //Tweet
$tweetidsi = $ayikla->id_str;
//echo $tweetidsi;
echo'
<form method="post" action="index.php?islem=fav" ><input name="favid" type="text" class="m-wrap" value="'.$tweetidsi.'" /> <input name="fav" type="button" class="button" value="10 Favori Ekle"/></form>
<form method="post" action="index.php?islem=rt" ><input name="rtid" type="text" class="m-wrap" value="'.$tweetidsi.'" /> <input name="rtw" type="button" class="button" value="10 Retweet Ekle"/></form>
';
}
?> $('.button').click(function(){
islem=$(this).attr('name');
twit_id=$(this).parent().find('.m-wrap').val();
if(islem=="fav")
{
adres="favori.php";
}else{
adres="retwit.php";
}
yolla="twit_id="+twit_id;
$.ajax({
type: "post",
url: adres,
data :yolla,
success : function(cevap){
alert(cevap);
//$("#goster").html(cevap);
}
});
});
uyguladım lakın çalıştıramadım hocam