我有一些将发布到用户墙上的代码,但是,在页面加载时它会发布的那一刻,我需要它仅在提交“发布到我的墙”按钮时发布。
这是我的代码:
<div align="center">
<form method="GET" action="translate.php">
<textarea name="status2" cols="50" rows="5"<input type="text"/>
<?php echo str_ireplace(array ('old','awkward','all','again','behind','along','alright','hello','among','children','yes','child','kids','food','barnard castle','beer','book','blow','beautiful','bird','burst','brown','burn','boots'),
array ('auld', 'aakwad', 'aall','agyen','ahint','alang','alreet','alreet','amang','bairns','aye','bairn','bairns','bait','barney','beor','beuk','blaa','bonny','bord','borst','broon','bourn','byeuts'),$status); ?>
</textarea><br>
<input type="submit" value="post to wall"
// i did try my wall code here but it still posted on page load
/>
</form>
</div>
<?php
$args = array(
'message' => 'Hello World',
'link' => 'http://apps.facebook.com/geordie-status/',
'caption' => 'Translate from English to Geordie'
);
$post_id = $facebook->api("/$uid/feed", "post", $args);
?>