Im trying to use the following PHP to add a favorite to my account:
<?php
if(isset($_POST['submit'])) {
$fav = $_REQUEST['fav'];
$connection->post('favorites/create', array('id' => $fav));
echo "<div style='padding-bottom: 5px; color: #0099FF;'>Fav Created Successfully.</div>";
}
?>
With the following form:
<form id="fav" method='post' action='index.php'>
<input type="text" style="width: 346px;" name="fav" id="fav" ></input>
<input type="submit" value="Fav This!" name="submit" id="submit" />
</form>
Its not creating a favorite, Can anyone spot anything wrong with it?
PS: I am using the OAuth API:
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);