1

I am having a weird issue, I have my local server running on my mac on mamp, and another server running uniserver on a windows machine, I am using twitteroAuth to use the twitter API, now everything is working fine on my machine but on the uniserver i get a 401 whenever i try to issue a getRequestToken, all i do is

    GLOBAL $twitter_key, $twitter_secret;
    $twitteroauth = new TwitterOAuth($twitter_key,$twitter_secret );

    $request_token = $twitteroauth->getRequestToken("http://".$_SERVER['HTTP_HOST']."");

any one have any idea what could be going on here?

Thanks!

Daniel

Daniel
  • 22,363
  • 9
  • 64
  • 71

1 Answers1

2

Make sure the clock on the uniserver is correctly synced. If it varies from the time on Twitter's servers by more than 5 minutes requests will fail. NTP is commonly used to keep clocks in sync.

abraham
  • 46,583
  • 10
  • 100
  • 152
  • yep that was it... I actually tried that, but just realized it had the wrong time zone! thanks a lot! – Daniel Apr 14 '12 at 00:31