views:

26

answers:

3

Hi I just finished coding my OAuth w/ zend framework. I retrieve my Token. The query string returned has user id,username,secret,token

I try the following

$twitter = new Zend_Service_Twitter(array(
'username' => $auth['username'],
'accessToken' => $auth['token']
));
$rsp = $twitter->status->update('My Tweet');

But I cant successfully sign in? My question is do I pass the full accessToken that contains all values? I tried that also but I still cant get an error that i did not sign in successfully

+1  A: 

Try this:

$twitter = new Zend_Service_Twitter( $auth['username'], $auth['token'])

The construction is not array.

Just a guess

xueyumusic
+1  A: 

For OAuth API access (in general, not just twitter) you provide the access token and the access token secret to gain access. There is no "sign in" at that point because that has already happened when you authorized using the request token in order to get the access token and access token secret.

I find the "Twitter Three-legged OAuth Example" here to be helpful: http://github.com/simplegeo/python-oauth2

kanaka