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

  • Home
  • SEARCH
  • 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 8938849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:43:30+00:00 2026-06-15T10:43:30+00:00

I want to insert, update data from the fusion tables. While selecting from the

  • 0

I want to insert, update data from the fusion tables.
While selecting from the fusion table all seems to work fine. But during row addition i need to used OAuth 2.0 but unable to find a suitable solution to get the access token and use it during the insert.

A code sample would help a lot.

  var fusiondata;
  function initialize() {

    // Initialize JSONP request
    var script = document.createElement('script');
    var url = ['https://www.googleapis.com/fusiontables/v1/query?'];
    url.push('sql=');
    var query = 'insert into 1bPbx7PVJU9NaxgAGKqN2da4g5EbXDybE_UVvlAE (name,luckynumber) values('abc',89)'; 
    var encodedQuery = encodeURIComponent(query);
    url.push(encodedQuery);
    url.push('&callback=viewData');
    url.push('&key=AIzaSyA0FVy-lEr_MPGk1p_lHSrxGZDcxy6wH4o');
    script.src = url.join('');
    var body = document.getElementsByTagName('body')[0];
    body.appendChild(script);
  }

  function viewData(data) {
  // code not required
  }
  • 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-06-15T10:43:30+00:00Added an answer on June 15, 2026 at 10:43 am

    I know most of you are suffering for google auth and inserting and updating fusion table. I am providing the entire code how to use the gauth lib to insert in a simple manner

        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Authorization Request</title>
        <script src="https://apis.google.com/js/client.js"></script>
            <script type="text/javascript">
              function auth() {
                var config = {
                  'client_id': '365219651081-7onk7h52kas6cs5m17t1api72ur5tcrh.apps.googleusercontent.com',
                  'scope': 'https://www.googleapis.com/auth/fusiontables'
                };
                gapi.auth.authorize(config, function() {
                  console.log('login complete');
                  console.log(gapi.auth.getToken());
                });
              }
              function insert_row(){
                    alert("insert called");
                    gapi.client.setApiKey('AIzaSyA0FVy-lEr_MPGk1p_lHSrxGZDcxy6wH4o');
    
                    var query = "INSERT INTO 1T_qE-o-EtX24VZASFDn6p3mMoPcWQ_GyErJpPIc(Name, Age) VALUES ('Trial', 100)";
    
                    gapi.client.load('fusiontables', 'v1', function(){
                        gapi.client.fusiontables.query.sql({sql:query}).execute(function(response){console.log(response);});
                    });
    
                }
            </script>
        </head>
    
        <body>
        <button onclick="auth();">Authorize</button>
        <p>&nbsp;</p>
        <button onclick="insert_row();">Insert Data</button>
        </body>
        </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to insert / update data into a MySQL table by using a
I have this query where I want to insert into table exp_channel_data data from
I want to be able to insert data from a table with an identity
I want to have an 'updateinfo' table in order to record every update/insert/delete operations
I want to insert a record into a MySQL database table from a formulaire.
I have a list of 10 data objects that I want to insert/update to
I want to pull data from an source destination. How can I insert rows
In my asp.net application,I want to use the detailsview to show/insert/update data in the
I want to push all data from SourceTable to TargetTable by inserting or updating
I have a asp.net 4.0 web application that uses linqtosql to insert/update/delete data from

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.