Re: [twitter-dev] twitteroauth and multiple domains

2011-02-07 Thread Archia
OK, I'll do so, but something I've done may be causing the following to be 
displayed after authorizing access:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this 
address in a way that will never complete.  

*   This problem can sometimes be caused by disabling or refusing to 
accept
  cookies.

Cookies are not disabled and config.php looks like this:

?php
/**
 * @file
 * A single location to store configuration.
 */

define('CONSUMER_KEY', myconsumerkey');
define('CONSUMER_SECRET', 'myconsumersecret');
define('OAUTH_CALLBACK', 'http://www.mysite.com/twitter/callback.php');

Can you suggest the trouble?

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


Re: [twitter-dev] twitteroauth and multiple domains

2011-02-07 Thread Archia
I think I found the trouble. I had switched the order of the lines below, 
putting config.php first:

require_once('/home/soundser/public_html/includes/twitteroauth/twitteroauth.php');
require_once('/home/soundser/public_html/includes/config.php');

Putting it back fixed the redirect.

-- 
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 and multiple domains

2011-02-06 Thread Archia
Hi,

twitteroauth is working under domain A, but is it necessary to reproduce all 
of the code under domain B to get it to work there. I've not been able to 
get things working beyond step 3 of the Flow Overview under domain B. I 
always end up back on connect.php under domain A.

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


Re: [twitter-dev] twitteroauth and multiple domains

2011-02-06 Thread Abraham Williams
You need to set your callback url in config.php.

Abraham
-
Abraham Williams | Hacker Advocate | abrah.am
@abraham https://twitter.com/abraham | github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Sun, Feb 6, 2011 at 11:26, Archia tomarchib...@gmail.com wrote:

 Hi,

 twitteroauth is working under domain A, but is it necessary to reproduce
 all of the code under domain B to get it to work there. I've not been able
 to get things working beyond step 3 of the Flow Overview under domain B. I
 always end up back on connect.php under domain A.

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


[twitter-dev] twitteroauth curl http_code returns zero

2010-12-31 Thread Enric
Hi, we developed an application that was hosted in a server that had
problems so we changed to dreamhost (the server we usually use and
where we had tested the application without problems).

In the new dreamhost account we installed the application but it is no
possible to authenticate, the curl returns http_code = 0...

I checked the code but I can't find the problem, here is the dump:

TwitterOAuth Object
(
[http_code] = 0
[url] = https://api.twitter.com/oauth/request_token?oauth_ca...
[host] = https://api.twitter.com/1/
[timeout] = 30
[connecttimeout] = 30
[ssl_verifypeer] =
[format] = json
[decode_json] = 1
[http_info] = Array
(
[url] = https://api.twitter.com/oauth/request_token?oauth_cal...
[content_type] =
[http_code] = 0
[header_size] = 0
[request_size] = 0
[filetime] = -1
[ssl_verify_result] = 0
[redirect_count] = 0
[total_time] = 0
[namelookup_time] = 2.4E-5
[connect_time] = 0
[pretransfer_time] = 0
[size_upload] = 0
[size_download] = 0
[speed_download] = 0
[speed_upload] = 0
[download_content_length] = 0
[upload_content_length] = 0
[starttransfer_time] = 0
[redirect_time] = 0
)

[useragent] = TwitterOAuth v0.2.0-beta2
[sha1_method] = OAuthSignatureMethod_HMAC_SHA1 Object
(
)

[consumer] = OAuthConsumer Object
(
[key] = ...
[secret] = ...
[callback_url] =
)

[token] = OAuthConsumer Object
(
[key] =
[secret] =
[callback_url] =
)

)

Thanks

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


Re: [twitter-dev] twitteroauth curl http_code returns zero

2010-12-31 Thread Abraham Williams
cURL returning a http_code of 0 generally means that your server can't make
connections to https://api.twitter.com. Make sure you don't have a firewall
blocking connections.

Abraham
-
Abraham Williams | Hacker Advocate | abrah.am
@abraham https://twitter.com/abraham | github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Thu, Dec 30, 2010 at 07:06, Enric juanpvinc...@gmail.com wrote:

 Hi, we developed an application that was hosted in a server that had
 problems so we changed to dreamhost (the server we usually use and
 where we had tested the application without problems).

 In the new dreamhost account we installed the application but it is no
 possible to authenticate, the curl returns http_code = 0...

 I checked the code but I can't find the problem, here is the dump:

 TwitterOAuth Object
 (
[http_code] = 0
[url] = https://api.twitter.com/oauth/request_token?oauth_ca...
[host] = https://api.twitter.com/1/
[timeout] = 30
[connecttimeout] = 30
[ssl_verifypeer] =
[format] = json
[decode_json] = 1
[http_info] = Array
(
[url] = https://api.twitter.com/oauth/request_token?oauth_cal.
 ..
[content_type] =
[http_code] = 0
[header_size] = 0
[request_size] = 0
[filetime] = -1
[ssl_verify_result] = 0
[redirect_count] = 0
[total_time] = 0
[namelookup_time] = 2.4E-5
[connect_time] = 0
[pretransfer_time] = 0
[size_upload] = 0
[size_download] = 0
[speed_download] = 0
[speed_upload] = 0
[download_content_length] = 0
[upload_content_length] = 0
[starttransfer_time] = 0
[redirect_time] = 0
)

[useragent] = TwitterOAuth v0.2.0-beta2
[sha1_method] = OAuthSignatureMethod_HMAC_SHA1 Object
(
)

[consumer] = OAuthConsumer Object
(
[key] = ...
[secret] = ...
[callback_url] =
)

[token] = OAuthConsumer Object
(
[key] =
[secret] =
[callback_url] =
)

 )

 Thanks

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


Re: [twitter-dev] TwitterOauth

2010-12-30 Thread Igor Kharin
Hello, Gary.

JSON parser says there's an error and he's obviously right. You should
notice that you're able to interact with API via JSON or XML. And as
far as I can see you're using some high-level interface which is
fetching XML end-point but assumes it's a JSON one. Even so, twitter
could not authenticate you and bugs may lay even deeply than that. I
think the best advice would be to double check your code or try
another lib.

On Sat, Dec 18, 2010 at 12:52 PM, Gary Zukowski ga...@tweetmyjobs.com wrote:
 I’m getting the following error when trying to do a simple update_profile:



 client.update_profile(:url = '')



 JSON::ParserError: 665: unexpected token at '?xml version=1.0
 encoding=UTF-8?

 hash

   request/1/account/update_profile/request

   errorCould not authenticate with OAuth./error

 /hash

 '



 Any ideas?



 Thanks,



 Gary Zukowski



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


[twitter-dev] TwitterOauth

2010-12-17 Thread Gary Zukowski
We've started seeing some errors using TwitteOauth.  Specifically, we get an
Incorrect signature error when trying to use the followers_ids method.
This method worked 3 days ago.  Has something changed?

 

 

Thanks,

 

Gary Zukowski

 

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


Re: [twitter-dev] TwitterOauth

2010-12-17 Thread Matt Harris
Hi Gary,

Can you share your basestring and Authorization header so we can investigate
further.

Thanks,
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris


On Fri, Dec 17, 2010 at 11:17 AM, Gary Zukowski ga...@tweetmyjobs.comwrote:

 We’ve started seeing some errors using TwitteOauth.  Specifically, we get
 an “Incorrect signature” error when trying to use the followers_ids method.
 This method worked 3 days ago.  Has something changed?





 Thanks,



 Gary Zukowski



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


[twitter-dev] TwitterOauth

2010-12-17 Thread Gary Zukowski
I'm getting the following error when trying to do a simple update_profile:

 

client.update_profile(:url = '')

 

JSON::ParserError: 665: unexpected token at '?xml version=1.0
encoding=UTF-8?

hash

  request/1/account/update_profile/request

  errorCould not authenticate with OAuth./error

/hash

'

 

Any ideas?

 

Thanks,

 

Gary Zukowski

 

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


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

2010-10-29 Thread Abraham Williams
What does printing $connection-http_code after making the call return?

Abraham
--
Evobots configured this transmission while traveling at 50 billion times the
speed of light.
On Oct 29, 2010 3:38 PM, José Luis jlgon...@ya.com wrote:
 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 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

2010-09-26 Thread Rick Stuivenberg
Hello,

Since the deprecated of the basic auth method, I am now using
TwitterOauth from Abraham. I am trying to get all of my followers
information in one array so I can use all those information and
process it.

I call the follow GET from the OAuth: $getids = $oauth-get('followers/
ids');

Now I want to know how to process these ids in order to use $oauth-
get('users/lookup', array('user_id' = 'ID'));

Is there somebody that wants to help me into the right direction or
has a example code.

Many thanks!

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

2010-08-26 Thread Gary Zukowski
Is anyone else having problem with TwitterOauth and friends?  

I'm trying to create friends with:

ret = @client.friend(twittername)

And the response I get is a null ret and test show up on the console.

Any ideas?

Thanks,

Gary Zukowski

-- 
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?hl=en


Re: [twitter-dev] TwitterOAuth, two authentication calls, one works, one fails... why?

2010-05-26 Thread Abraham Williams
Are the scripts on the same server? Same version of PHP? Are they using the
same accounts access tokens? Same consumer token?

Abraham

On Sun, May 23, 2010 at 18:07, Jonathan jhsa...@jhsachs.com wrote:

 I've been trying to get my application to work with TwitterOAuth for
 several weeks now. Here’s a brief history:

 I need to authorize user requests of three different types. For that
 purpose I’ve got two scripts (I’ll call them #1 and #2), and #2 is
 invoked in two places.

 Several weeks ago I got script #1 to work with an old version of
 TwitterOAuth, which did not support specifying a callback URL for each
 call. I then tried to migrate to a newer version (beta-0.2.0), which
 would support specifying a callback URL, and script #1 ceased to work.
 Everything seemed OK up to the point where I tested the access token
 by performing a verify_credentials operation; then I got back an error
 that said “could not authenticate you.”

 I had no luck identifying the problem, so today I fell back to the old
 version of TwitterOAuth. Now script #1 works again, but script #2 does
 not. It returns the same error, “could not authenticate you.”

 I've inserted echo statements in both scripts to show the parameters
 and result of every call to TwitterOAuth. The sequences of calls are
 identical, and as far as I can tell the parameters and results are
 identical in every respect that they should be. Yet one call succeeds
 and the other fails.

 I've been beating may head against this thing for weeks, and I'm
 stumped.

 I'm open to any sort of advice on what the problem might be, or how to
 identify it, or how to work around it without identifying it.




-- 
Abraham Williams | Developer for hire | http://abrah.am
@abraham | http://projects.abrah.am | http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.


[twitter-dev] TwitterOAuth, two authentication calls, one works, one fails... why?

2010-05-23 Thread Jonathan
I've been trying to get my application to work with TwitterOAuth for
several weeks now. Here’s a brief history:

I need to authorize user requests of three different types. For that
purpose I’ve got two scripts (I’ll call them #1 and #2), and #2 is
invoked in two places.

Several weeks ago I got script #1 to work with an old version of
TwitterOAuth, which did not support specifying a callback URL for each
call. I then tried to migrate to a newer version (beta-0.2.0), which
would support specifying a callback URL, and script #1 ceased to work.
Everything seemed OK up to the point where I tested the access token
by performing a verify_credentials operation; then I got back an error
that said “could not authenticate you.”

I had no luck identifying the problem, so today I fell back to the old
version of TwitterOAuth. Now script #1 works again, but script #2 does
not. It returns the same error, “could not authenticate you.”

I've inserted echo statements in both scripts to show the parameters
and result of every call to TwitterOAuth. The sequences of calls are
identical, and as far as I can tell the parameters and results are
identical in every respect that they should be. Yet one call succeeds
and the other fails.

I've been beating may head against this thing for weeks, and I'm
stumped.

I'm open to any sort of advice on what the problem might be, or how to
identify it, or how to work around it without identifying it.