0
<?
// here we want to send the article to twitter
require_once('twitteroauth.php');
// Twitter Connection Data
$tConsumerKey       = 'xxxx';
$tConsumerSecret    = 'xxxx';
$tAccessToken       = 'xxxx';
$tAccessTokenSecret = 'xxxx';
// start connection
$tweet = new TwitterOAuth($tConsumerKey, $tConsumerSecret, $tAccessToken, $tAccessTokenSecret);
// the message
$message = 'Auto Tweet via PHP ...';
// send to twitter
$tweet->post('statuses/update', array('status' => $message));
?>

here is my code .. it does not send post tweet. is it about localhost or something else ? I'm using xampp on windows7 ..

mkmeral
  • 111
  • 1
  • 2
  • 10

1 Answers1

0

Which library are you using for OAuth? Is it for an app that you have made or somebody elses?

If you can edit and check the settings on the Twitter developer area, this question about using localhost with your twitter application might be useful for your callback when authenticating your app.

Twitter oAuth callbackUrl - localhost development

I found it useful when wanting to connect apps during development. Using 127.0.0.1.

Community
  • 1
  • 1
tomsowerby
  • 498
  • 1
  • 3
  • 10