[twitter-dev] Re: TwitterOAuth example gets 401 all the time

2010-11-01 Thread José Luis


On 1 nov, 06:45, Abraham Williams 4bra...@gmail.com wrote:
 Check to make sure the clock on the server/computer is correct. If it is off
 by more then five minutes this is likely the problem.

It can't be Abraham. It's synchronized with NTP so it should be
perfect.

I'm puzzled at this. Any other hint would be appreciated. Thanks for
your help anyway Abraham.

-- 
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


[twitter-dev] Re: TwitterOAuth example gets 401 all the time

2010-11-01 Thread José Luis
On 1 nov, 21:00, @IDisposable idisposa...@gmail.com wrote:
   Check to make sure the clock on the server/computer is correct. If it is 
   off
   by more then five minutes this is likely the problem.

  It can't be Abraham. It's synchronized with NTP so it should be
  perfect.

 Unless you've verified the time, it certainly CAN be. Even if a
 machine it setup to NTP, doesn't mean it can get there, is sucessful,
 etc. You need to check logs and verify that the time on the machine is
 now correct and NTP is happening.  Note, on Windows servers, for
 example, the default  frequency of NTP syncs is more than 24 hours. If
 you're running on a hosted virtual machine, drift can easily be hours
 over that time frame.

Time is perfectly synchronized. I checked when I wrote my previous
message and again now. There drift is half a second at most.

Daylight saving time was changed yesterday, right before I checked for
the first time. That's the only thing I can think that could make time
differences, but I suppose time in Twitter's servers also changed so
that couldn't be causing the 401.

-- 
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


[twitter-dev] TwitterOAuth example gets 401 all the time

2010-10-31 Thread José Luis
Hi,

I'm trying TwitterOAuth's example but can't get it to authorize with
Twitter. It gets stuck all the the time in redirect.php with the
connection getting a 401 code all the time. I have set the consumer
key and secret in config.php as stated in the documentation and also
the oauth_callback. The credentials come from a registered app so they
should be correct.

I can't understand why I'm getting the 401s. Why may this be happening
and how could I fix it?

-- 
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


[twitter-dev] Re: TwitterOAuth example gets 401 all the time

2010-10-31 Thread José Luis
I forgot to mention the URL I am using for the TwitterOAuth example is
not the same I used to register the application whose credentials I am
using. But I understand the URL for the app is registered just for
Twitter to know the application so this shouldn't pose any problem,
could it?

On 31 oct, 17:04, José Luis jlgon...@ya.com wrote:
 Hi,

 I'm trying TwitterOAuth's example but can't get it to authorize with
 Twitter. It gets stuck all the the time in redirect.php with the
 connection getting a 401 code all the time. I have set the consumer
 key and secret in config.php as stated in the documentation and also
 the oauth_callback. The credentials come from a registered app so they
 should be correct.

 I can't understand why I'm getting the 401s. Why may this be happening
 and how could I fix it?

-- 
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


[twitter-dev] Re: TwitterOAuth fails in getRequestToken()

2010-10-30 Thread José Luis


On 30 oct, 05:55, Abraham Williams 4bra...@gmail.com wrote:
 What does printing $connection-http_code after making the call return?

The call does not return, so I can't tell. I have traced it and it's
dying in the http function, exactly here:

$ci = curl_init();

This call doesn't return and the script dies there. Since it's a PHP
function could it be that PHP isn't installed right?

-- 
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


[twitter-dev] Re: TwitterOAuth fails in getRequestToken()

2010-10-30 Thread José Luis
I have reviewed phpinfo()'s output on my server and libcurl isn't
explicitly enabled in the configuration command. Should it be? If it
should that's the cause of the problem.

On 30 oct, 14:22, José Luis jlgon...@ya.com wrote:
 On 30 oct, 05:55, Abraham Williams 4bra...@gmail.com wrote:

  What does printing $connection-http_code after making the call return?

 The call does not return, so I can't tell. I have traced it and it's
 dying in the http function, exactly here:

 $ci = curl_init();

 This call doesn't return and the script dies there. Since it's a PHP
 function could it be that PHP isn't installed right?

-- 
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


[twitter-dev] Re: TwitterOAuth fails in getRequestToken()

2010-10-30 Thread José Luis


On 30 oct, 16:33, Abraham Williams 4bra...@gmail.com wrote:
 Yes. Libcurl is required you will also want to make sure openssl is enabled.

Thanks Abraham. Please, could you mention this in the documentation?
At least in openSUSE PHP isn't compiled with it so it would help other
users not to make the same error.

-- 
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


[twitter-dev] TwitterOAuth fails in getRequestToken()

2010-10-29 Thread José Luis
I'm trying TwitterOAuth's examples and have come across the following
problem. When Signing in the redirect.php page doesn't redirect to any
page. Tracing it the script dies when doing:

/* Get temporary credentials. */
$request_token = $connection-getRequestToken(OAUTH_CALLBACK);

If I put an echo before it prints. If I put it afterwards no message
gets printed.

What could be going wrong and how could it get fixed?

-- 
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


[twitter-dev] Re: How to tweet?

2010-10-21 Thread José Luis
Thanks Slate. I will have to take a look at it.

On 20 oct, 19:15, Slate Smith sl...@slatesmith.com wrote:
 I use @abraham's TwitterOAuth lib with a wrapper class. It's pretty  
 simple actually. Here is my method:

         public function Tweet($tweet) {

                 $parameters = array(status = $tweet);
                 $status = $this-connection-post(statuses/update, 
 $parameters);
                 $this-Stats(statuses/update, $status, $this-connection-
  http_code, $parameters);

         }

 Where $tweet is a string that you want to ... tweet.

 For now, ignore the third line in the function.

 On Oct 20, 2010, at 1:03 PM, José Luis wrote:

  Hi,

  I'm sorry to ask what may seem to be a rather obvious question, but I
  simply haven't been able to find the answer on my own:

  What is the proper way to tweet  from twitter api? I've been looking
  at the documentation and guess that it is from REST API but have found
  no method for it (only for retweeting), the most similar way being the
  Tweet button. I'm just looking for something so that an external web
  page (Facebook application) can tweet when loaded, which is when an
  external event happens. So what is the way for it?

  --
  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

-- 
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