Re: [twitter-dev] Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread Abraham Williams
You don't need to change the code in twitteroauth.php. You just use
$connection->getAuthorizeURL($token, false) to get the authorize URL instead
of the authenticate URL.

If you are having other issues it is likely unrelated to this change as the
only difference is sending users to api.twitter.com/oauth/authorize instead
of api.twitter.com/oauth/authenticate. If you can make one call then you are
likely either not properly saving the access token in sessions/db or you are
overwriting it with a new request token at some point.

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



On Mon, Jul 4, 2011 at 19:59, PeriVisioN  wrote:

> Very confused.  I have abrahams API lib, works fine.   After the
> change, I updated my apps permission and then changed the following in
> his code.
>
>  function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
>
>if (is_array($token)) {
>  $token = $token['oauth_token'];
>}
>return $this->authorizeURL() . "?oauth_token={$token}";
>/*
>if (empty($sign_in_with_twitter)) {
>  echo 'calling authorizeURL';
>  return $this->authorizeURL() . "?oauth_token={$token}";
>} else {
>  echo 'calling authenticateURL'; return;
>  return $this->authenticateURL() . "?oauth_token={$token}";
>}
>*/
>  }
>
> So I can make 1 call, but after that, its give me a 403
> Could not authenticate with OAuth. /1/account/verify_credentials.xml?
>
> Any thoughts
>
> --
> Twitter developer documentation and resources: https://dev.twitter.com/doc
> API updates via Twitter: https://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> https://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> https://groups.google.com/forum/#!forum/twitter-development-talk
>

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk


[twitter-dev] Changed to authorizeURL; get the proper permission, but now get 401, 401 after one call

2011-07-05 Thread PeriVisioN
Very confused.  I have abrahams API lib, works fine.   After the
change, I updated my apps permission and then changed the following in
his code.

  function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {

if (is_array($token)) {
  $token = $token['oauth_token'];
}
return $this->authorizeURL() . "?oauth_token={$token}";
/*
if (empty($sign_in_with_twitter)) {
  echo 'calling authorizeURL';
  return $this->authorizeURL() . "?oauth_token={$token}";
} else {
  echo 'calling authenticateURL'; return;
  return $this->authenticateURL() . "?oauth_token={$token}";
}
*/
  }

So I can make 1 call, but after that, its give me a 403
Could not authenticate with OAuth. /1/account/verify_credentials.xml?

Any thoughts

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk