You don't need to change the TRUE to FALSE in twitteroauth.php you pass
FALSE as the second parameter when you call the getAuthorizeURL method. This
is only used when a (generally) unauthenticated user gets redirected to
twitter.com with a request token to allow access to their account. For all
existing users they will have to do this again before the access tokens will
have DM access.

In the example code this is done in line 22 of redirect.php
https://github.com/abraham/twitteroauth/blob/master/redirect.php#L22

Abraham
-------------
Abraham Williams | InboxQ <http://inboxq.com/> | abrah.am
@abraham <https://twitter.com/intent/follow?screen_name=abraham> |
github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Tue, Jul 5, 2011 at 14:58, oosswwaalldd <oosswwaal...@gmail.com> wrote:

> I am little bit confused, I understood that the problem was solved by
> changing to "FALSE" in this line
> "function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {"
> in twitteroauth.php, but I am reading from you that the change is not
> in this file.
>
> In my code the only call I have to authorize/authenticate is this
> (main file where I process the DMs, this file requires
> twitteroauth.php)
>
> /* Create a TwitterOauth object with consumer/user tokens. */
> $connection = new TwitterOAuth($consumer_key,$consumer_secret,
> $oauth_token,$oauth_token_secret);
>
> where am I supposed to change this "FALSE"?
>
> Thanks for the help
>
>
> On Jul 5, 12:45 pm, Abraham Williams <4bra...@gmail.com> wrote:
> > 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/authorizeinstead
> > 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 <http://inboxq.com/> | abrah.am
> > @abraham <https://twitter.com/intent/follow?screen_name=abraham> |
> > github.com/abraham | blog.abrah.am
> > This email is: [ ] shareable [x] ask first [ ] private.
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Jul 4, 2011 at 19:59, PeriVisioN <perivis...@gmail.com> 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<br>';
> > >      return $this->authorizeURL() . "?oauth_token={$token}";
> > >    } else {
> > >      echo 'calling authenticateURL<br>'; 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 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

Reply via email to