php - get data from text area and post to a wall onfacebook -
not sure if possible, need take data text area , let user post wall.
my code snippet
<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 wall" /> </form> </div> <?php $args = array( 'message' => 'hello world', 'link' => 'http://apps.facebook.com/geordie-status/', 'caption' => 'translate english geordie' ); $post_id = $facebook->api("/$uid/feed", "post", $args); ?>
the default message 'hello world' posts wall, replace text in 'status2' text area. possible?
thanks
<textarea name="status2" cols="50" rows="5"<input type="text"/>
doesn't make sense. guessing textarea coded in real snippet. should have value of textarea inside $_get['status2'], change traslate.php:
$args = array( 'message' => $_get['status2'] ...
this code i've written test:
index.html
<form method="get" action="server.php"> <textarea name="status2"></textarea> <input type="submit" value="go"/> </form>
server.php
<? print_r($_get); ?>
Comments
Post a Comment