Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:21:34+00:00 2026-05-26T07:21:34+00:00

So I have setup a twitter application so that people can reply to tweets

  • 0

So I have setup a twitter application so that people can reply to tweets inside my own app. I have a callback URL and when I do not try and override it everything seems to go fine. However Now I am having a problem getting the override of the callback to work the app runs on multiple sub domains and servers based on what stage of development it is in and I would like to override the callback to the current url.

When I do override the callback and twitter attempts to send the User back to that page I get to a page that says “Sorry, that page doesn’t exist!”

and the URL looks something like this

https://twitter.com/oauth/http%3A//127.0.0.1/authtwitter%3FtwitterCallback?oauth_token=VALUE&oauth_verifier=VALUE

and Here is my Python code using this library for the oauth: https://github.com/simplegeo/python-oauth2

    #SETUP TWITTER AUTHORIZATION OBJECT
    request_token_url = 'http://twitter.com/oauth/request_token'
    access_token_url = 'http://twitter.com/oauth/access_token'
    authorize_url = 'http://twitter.com/oauth/authenticate'

    consumer = oauth.Consumer(consumer_key, consumer_secret)
    client = oauth.Client(consumer)

    #get request token
    callbackURL = urllib.quote("%s?twitterCallback" % self.request.url)

    resp, content = client.request(request_token_url, "POST", body=urllib.urlencode({'oauth_callback':callbackURL}))
    if resp['status'] != '200':
            raise Exception("Invalid Response %s." %resp['status'])

    request_token = dict(urlparse.parse_qsl(content))

    tmpldict['callbackURL'] = callbackURL
    tmpldict['oauth_token'] = request_token['oauth_token']  
    tmpldict['twitauthurl'] = "%s?oauth_token=%s" % ( authorize_url, request_token['oauth_token'] )                               

    qargs=urlparse_qs(self.request.url,True,False)

    if 'oauth_verifier' in qargs:
            oauth_verifier = qargs['oauth_verifier'][0]
    else:
            oauth_verifier = None

    if oauth_verifier:
            token = oauth.Token(request_token['oauth_token'], request_token['oauth_token_secret'])
            token.set_verifier(oauth_verifier)

            client = oauth.Client(consumer,token)

            resp, content = client.request(access_token_url, "GET")
            access_token = dict(urlparse.parse_qsl(content))

Current Flow for User

Click authorization URL

Hit Allow Access on Twitter

Twitter Displays: Redirecting you back to the application

Cannot Find page with URL like the example above.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:21:34+00:00Added an answer on May 26, 2026 at 7:21 am

    Few quick things…

    Your URLs are old and outdated and don’t function as well as the proper URLs. Use SSL and the api subdomain:

    • https://api.twitter.com/oauth/request_token
    • https://api.twitter.com/oauth/authorize
    • https://api.twitter.com/oauth/access_token

    It’s unclear to me looking at this code whether you’re performing header-based OAuth or querystring-based OAuth. I recommend header-based OAuth — it dramatically separates concerns and makes it easier to discover wrongness when it happens.

    Make sure that when you send your dynamic oauth_callback value to the oauth/request_token step that it’s correctly percent-encoded. Also, make sure you have a placeholder HTTP-based callback on your application record on dev.twitter.com/apps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup an Application that uses @Anywhere from twitter to Authenticate the users.
I have a Rails app running on 3.1.0.rc5, and I've setup omniauth for twitter
I have an application that loads a vast amount of data from twitter. We
I have a WCF service (not RIA) that I access from Silverlight. The application
I have OmniAuth setup to use Twitter like so: Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter,
I have twitter bootstrap setup to build in a new project, but am getting
I have setup airbrake in my app but it doesn't seem to log any
I have setup an app project and a static project in a workspace in
I have setup some simple associations in my rails app: resources :properties do resources
I have setup hadoop on top of mongodb using hadoop-mongodb driver. Currently I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.