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 7642499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:12:20+00:00 2026-05-31T09:12:20+00:00

I am following Google oAuth tutorial. And I am having some trouble with authorizing

  • 0

I am following Google oAuth tutorial. And I am having some trouble with authorizing user.

I am sending user to twitter for authorization. As this is chrome extension and there is no callback. I dont know how to send tweet on the behalf of that user.
How I am doing things:

  1. I have a background page that has the code of authorizing user from twitter. On the time when user install the extension, background page send that user to twitter for authorization. My authorization method is getting called with their call back. But dont know if I am having everything to make a tweet.
  2. Now when user will click on extension icon, the popup.html will be appear. And on this page I want user to send a tweet. How?

Following is my code:

manifest.json

{
"name": "TweetChrome",
"version": "1.0",
"description": "Tweet from Chrome",
"browser_action": {
"default_icon": "images/share.png",
 "popup": "popup.html"
},
"permissions": [
 "tabs",
"http://ajax.googleapis.com",
"*://*.twitter.com/*",
 "clipboardWrite"
],
"options_page": "options.html",
"background_page": "background.html"  
 }

background.html
I am getting some html page markup in resp of callback method. I dont know what it is for?

var oauth = ChromeExOAuth.initBackgroundPage({
                      'request_url': 'https://api.twitter.com/oauth/request_token',
                      'authorize_url': 'https://api.twitter.com/oauth/authorize',
                      'access_url': 'https://api.twitter.com/oauth/access_token',
                      'consumer_key': 'key',
                      'consumer_secret': 'secret',
                      'scope': '',
                      'app_name': 'TweetChrome'
                    });

                oauth.authorize(onAuthorized);  

            function onAuthorized() {
              var url = 'https://api.twitter.com/oauth/authorize';
                           /*as they are optional, i left empty*/
              var request = {
                'force_login': '',
                'screen_name': ''
              };
              oauth.sendSignedRequest(url, callback, request);
            };

            function callback(resp, xhr) { alert('it get called too'); };

popup.html
To tweet I am using a borrowed twitter.js. I didn’t wrote it.

           Twitter.verify_credentials({install: true});           
       Twitter.update("test");

My approach of oauth is right on having it in a background page? As my authorization is getting call how much far I am to make a tweet for a user?

Any help will be appreciated. I am hopeful to solve this issue to finish my extension.

  • 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-31T09:12:21+00:00Added an answer on May 31, 2026 at 9:12 am

    You don’t need to request https://api.twitter.com/oauth/authorize in onAuthorized – once you get to that function, you already have a key and the user has authenticated.

    Try requesting http://api.twitter.com/1/account/verify_credentials.json in onAuthorized instead. You should see a JSON response with the user’s information.

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

Sidebar

Related Questions

While following this tutorial on using OAuth 2 with the Android AccountManager, I'm told
Edit: closing anchor fixed. This issue exists when testing on the following browsers: Google
I have written the following: var pages=[[www.google.co.uk] This is the WWW. ,[www.yahoo.co.uk] This is
I've been following the Google App Engine tutorials, and I'm having a problem with
I try to access information from Twitter and I followed this link: http://code.google.com/p/sociallib/wiki/SocialLibGuide I
I was able to get oauth token from FourSquare by following a tutorial given
I am using (OpenId+OAuth) hybrid protocol. After I redirect user to https://www.google.com/accounts/o8/ud with all
I'm trying to set up OAuth with Google services. Following the example here ,
I have set up the OAuth request following the documentation for a Non-Google Service
I'm trying to connect to google documents (following Marco Cantu's excellent REST example) but

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.