A1SURF.us Posted March 8, 2010 Share Posted March 8, 2010 Hello!! I don't know to much PHP but I manage to get along just fine most of the time. If you don't know, Twitters API class lets you post from anywhere using this snippet here: $tweet = new Twitter("USERNAME", "PASSWORD"); //login and password for twitter// $success = $tweet->update(" www.domain.com lorum ipsum lorum ipsum lorum ipsum"); // twitter update - I want to add variables here// if ($success) echo "Tweet Succesful"; else echo $tweet->error; How do I add these database variables into the tweet update? <?=$ad["ad_description"];?> <?=$ad["ad_id"];?> Link to comment https://forums.phpfreaks.com/topic/194473-add-variables-from-database-to-twitter-api/ Share on other sites More sharing options...
trq Posted March 8, 2010 Share Posted March 8, 2010 Assuming you just want the variables to be passed to the update() method.... $success = $tweet->update("{$ad["ad_description"]} {$ad["ad_id"]}"); Link to comment https://forums.phpfreaks.com/topic/194473-add-variables-from-database-to-twitter-api/#findComment-1022889 Share on other sites More sharing options...
A1SURF.us Posted March 8, 2010 Author Share Posted March 8, 2010 Worked like a charm man!! Thanx!! Link to comment https://forums.phpfreaks.com/topic/194473-add-variables-from-database-to-twitter-api/#findComment-1022892 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.