Im very much a newbie to PHP and the Twitter API.

Im trying to create a form button to set a tweet as a favorite.

I have OAuth working to post status updates and i've tried to amend
the status update code to set a tweet to be a favorite.

Wonder if anyone could help me:

$qtweet = A Twitter ID

if(isset($_POST['submit'])) {
        $qtweet = $_REQUEST['fav'];
        $connection->post('favorites/create', array('id' => $qtweet));
        echo "<div style='padding-bottom: 5px; color: #0099FF;'>Favorite
Created.</div>";
}

<form id="fav" method='post' action='index.php'>
        <input style="width: 346px;" name="fav" id="fav" ></textarea>
        <input type='submit' value='Tweet This!' name='submit' id='submit' />
</form>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to