Added a new param to the Twython __init__ that lets you select the authe... #240

Merged
jackboot7 merged 1 commit from master into master 2013-07-23 21:20:39 -07:00
jackboot7 commented 2013-07-17 13:53:52 -07:00 (Migrated from github.com)

We couldn't access twitter direct messages via our application, even if the application had Read, Write and Access permissions Twitter oauth authorize app page still said: This application will not be able to: Access your direct messages

Found out that the correct endpoint for giving access to Direct Messages was authorize instead of authenticate.

We couldn't access twitter direct messages via our application, even if the application had _Read, Write and Access_ permissions Twitter oauth authorize app page still said: _This application will not be able to: Access your direct messages_ Found out that the correct endpoint for giving access to Direct Messages was **authorize** instead of **authenticate**.
michaelhelmick commented 2013-07-17 15:52:36 -07:00 (Migrated from github.com)

You don't actually have to add the parameter to the __ini__

Just change the endpoint to oauth/authorize The only difference between oauth/authorize and oauth/authenticate is that Desktop apps can not use oauth/authenticate.

So yeah, just revert the current changes and change the endpoint from oauth/authenticate to oauth/authorize and I'll be glad to merge this!

You don't actually have to add the parameter to the `__ini__` Just change the endpoint to `oauth/authorize` The only difference between oauth/authorize and oauth/authenticate is that Desktop apps **can not** use oauth/authenticate. So yeah, just revert the current changes and change the endpoint from `oauth/authenticate` to `oauth/authorize` and I'll be glad to merge this!
jackboot7 commented 2013-07-18 08:50:47 -07:00 (Migrated from github.com)

Shouldn't Twython support both methods? That way Twython could support both options implemented by the Twitter API.

From GET oauth/authenticate section in the Twitter API:

This method differs from GET oauth/authorize in that if the user has already granted the application permission,
the redirect will occur without the user having to re-approve the application. To realize this behavior, you must
enable the Use Sign in with Twitter setting on your application record.

What do you think?

Shouldn't Twython support both methods? That way Twython could support both options implemented by the Twitter API. From _GET oauth/authenticate_ section in the [Twitter API:](https://dev.twitter.com/docs/api/1/get/oauth/authenticate) > This method differs from GET oauth/authorize in that if the user has already granted the application permission, > the redirect will occur without the user having to re-approve the application. To realize this behavior, you must > enable the Use Sign in with Twitter setting on your application record. What do you think?
michaelhelmick commented 2013-07-18 17:06:49 -07:00 (Migrated from github.com)

Hrm, I'm not sure why you were getting the message

This application will not be able to: Access your direct messages

I created a new application and used the current build of Twython and it says that the app will be able to access my DMs.

screen shot 2013-07-18 at 8 04 04 pm

By chance, were you already authenticated with an app that didn't have access to direct messages then try to re-authenticate with it after you set your app permissions?

Hrm, I'm not sure why you were getting the message > This application will not be able to: Access your direct messages I created a new application and used the current build of Twython and it says that the app will be able to access my DMs. ![screen shot 2013-07-18 at 8 04 04 pm](https://f.cloud.github.com/assets/352270/823243/cd872208-f006-11e2-9cc8-9e09dadd0b32.png) By chance, were you already authenticated with an app that _didn't_ have access to direct messages then try to re-authenticate with it _after_ you set your app permissions?
jackboot7 commented 2013-07-19 11:32:24 -07:00 (Migrated from github.com)

No, my application had DM permissions since the beginning, but when trying to authenticate it I kept getting the "No DM access" message from Twitter, it was fixed changing the URL directly in the browser from authenticate to authorize. That's why I added the option to Twython.

No, my application had DM permissions since the beginning, but when trying to authenticate it I kept getting the "No DM access" message from Twitter, it was fixed changing the URL directly in the browser from authenticate to authorize. That's why I added the option to Twython.
michaelhelmick commented 2013-07-23 08:55:23 -07:00 (Migrated from github.com)

@jackboot7 Sorry for not following up with this, one last question. Is your application a Desktop application or a Web application?

@jackboot7 Sorry for not following up with this, one last question. Is your application a Desktop application or a Web application?
jackboot7 commented 2013-07-23 09:25:15 -07:00 (Migrated from github.com)

A web application, once I changed the endpoint to ouath/authorize I had the authentication flow working as it should.

I don't think is a Twython problem but Twitter's, since I got the right permissions once I changed the endpoint (directly in the URL bar in my browser).

A web application, once I changed the endpoint to ouath/authorize I had the authentication flow working as it should. I don't think is a Twython problem but Twitter's, since I got the right permissions once I changed the endpoint (directly in the URL bar in my browser).
michaelhelmick commented 2013-07-23 21:20:24 -07:00 (Migrated from github.com)

Fair enough, I'll merge this. Still, such strange behavior 😵

Fair enough, I'll merge this. Still, such strange behavior :dizzy_face:
jackboot7 commented 2013-07-24 08:20:57 -07:00 (Migrated from github.com)

Cool :)

Cool :)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/twython#240
No description provided.