Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twitculrl::oAuthHandlePIN() No longer works #57

Open
cesareof opened this issue Apr 8, 2015 · 3 comments
Open

twitculrl::oAuthHandlePIN() No longer works #57

cesareof opened this issue Apr 8, 2015 · 3 comments

Comments

@cesareof
Copy link

cesareof commented Apr 8, 2015

What steps will reproduce the problem?

  1. Run TwitterClient.exe and attempt to use twitter client without visiting Twitter
  2. Press 0 at PIN Authorization, attempting to bypass user interaction.
  3. Even when supplying a proper Username and Password the application will fail

What is the expected output? What do you see instead?
The TwitCurl uses the function oAuthHandlePIN to connect to twitter and submit a signin/authorize form to Twitter with the username and password supplied. Instead of returning a page with the pin encapsulated in: code-desc">######, the form submit returns a page with:

You are being redirected.

What version of the product are you using? On what operating system?
Using Windows 7, and the latest source downloaded from GitHUB.

Please provide any additional information below.
It seems twitter may have updated this webpage because inorder to get TwitCURL to find the Authenticity_Token and oAuthToken, I had to update
twitcurlurls.h
const std::string OAUTHLIB_TOKEN_END_TAG_TWITTER_RESP = "" />";

to this:
const std::string OAUTHLIB_TOKEN_END_TAG_TWITTER_RESP = "">";

Visiting Twitter and collecting the pin there and returning it to the application still works fine, but I need this library to be able to automate Twitter Status Updates without user interaction.

@daniel-lucio
Copy link
Contributor

It wont work, this used to work on API 1.0, but since Twitter does not accept 1.0 any more, no way help. Maybe doing a curl to the page, and parsing HTML and extracting PIN.

But sounds more a hack than the correct way to proceed

@cesareof
Copy link
Author

cesareof commented Aug 3, 2015

I actually fixed this myself and documented how that was accomplished here: https://code.google.com/p/twitcurl/issues/detail?id=57

The way the original code worked was to send a cUrl page to Twitter then parse the response for the PIN, Twitter just made some changes to how this had to be accomplished, requiring a session cookie to be passed along with the form submission, unfortunately my need to automate the tweets for Twitter users for whom I have usernames and passwords for left not alternative in the supported Twitter API.

@daniel-lucio
Copy link
Contributor

I will do the pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants