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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:23:47+00:00 2026-05-24T07:23:47+00:00

I check a possibility to integrate fusiontables into my Delphi TWebBrowser based application. But

  • 0

I check a possibility to integrate fusiontables into my Delphi TWebBrowser based application.

But I cannot continue my project because I don’t understand many things.

I have a public table, I want to access this, upload some rows, update some rows, and show it with fusiontablelayer. I have only “free” account now.

The problems:

1.)

I need to authenticate.

var
    posts, s, url : string;
    authToken : string;
    postdata,
    header : OleVariant;
    params : TStringList;
    i : integer;
begin
    header := 'Content-type: application/x-www-form-urlencoded'#13#10;

    params := TStringList.Create;
    try
        params.Values['accountType'] := 'GOOGLE';
        params.Values['Email'] := 'any';
        params.Values['Passwd'] := 'any';
        params.Values['service'] := 'fusiontables';
        params.Values['source'] := '?'; // WHAT IS THIS?
        posts := EncodeParamsToURL(params);
    finally
        params.Free;
    end;

    postdata := VarArrayCreate([0, Length(posts) - 1], varByte);

    // Put Post in array
    for i := 1 to Length(posts) do
        postdata[I - 1] := Ord(posts[I]);

    url := 'https://www.google.com/accounts/ClientLogin';
    wb.Navigate(url, emptyparam, emptyparam, postdata, header);

    while wb.ReadyState <> READYSTATE_COMPLETE do
        Application.ProcessMessages;

    s := (wb.Document as iHTMLDocument2).body.innerText;

This is only a demo, but it is working.
I don’t know what is “SOURCE” parameter, but I got three lines as result, and the last is “Auth=….” that containing the token.

http://code.google.com/intl/hu-HU/apis/fusiontables/docs/samples/apps_script.html

2.)

I need to push this token into header.
When I do this, I got 401 error.

params := TStringList.Create;
try
    params.Text := s;
    authToken := params.Values['Auth'];
finally
    params.Free;
end;


header := 'Authorization : GoogleLogin auth="' + authToken + '"'#13#10;

url := 'http://www.google.com/fusiontables/api/query?select * from 1236944';

wb.Navigate(url, emptyparam, emptyparam, emptyparam, header);

So I’m totally confused now.

First:

Because JavaScript layer don’t have authentication interface, I think I need to authenticate the “browser”. May this is is wrong idea, but my thinking based on common web login logic, where the login creates a Session, and the Session is identified as a hidden cookie what is valid in this browser.
But may Google login is uses an identifier what passed on every request… I don’t know.

So because this I must do an automatic “login” in the browser. (If that is not true then I can use WinInet, or IdHTTP for login, and use only the token in the browser).

Now I don’t have idea how to do this login automatically without show the login name/pwd in the html, or show the token result in the TWebBrowser…

Second:

I must modify the data. This may realizable in a transparent component, like idHTTP, and I can show only the changes in the WebBrowser…

Third:

I can show the fusion table with a layer. This is not too hard if I has been authenticated once…

So: I’m confused now, because Google supports only Python/Java as client library, and not Delphi. I need to integrate the authentication and visualization into my TWebBrowser component very transparently.

But there is no good example or source in the net what demonstrate the login + fusiontable manipulation…

Can anybody help me in this question?

  • 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-24T07:23:47+00:00Added an answer on May 24, 2026 at 7:23 am

    Question 1 is answered in section “The ClientLogin interface”:

    Source:

    Short string identifying your application, for logging purposes. This
    string should take the form: “companyName-applicationName-versionID”.

    Question 2:

    Your URL is wrong, it has to be:

    url := 'http://www.google.com/fusiontables/api/query?sql=select * from 1236944';
    

    See the “sql=” -part? That’s important. Have a look here for an example.

    Regarding your other questions: they are a bit confusing. I think you don’t have to use the TWebBrowser and can use anything that can issue GET and POST requests. For the login part: this information should be provided by your user, because your application should empower your users to work with their data, right?

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

Sidebar

Related Questions

How can I check for duplicate email addresses in PHP , with the possibility
Check out http://fube.ca in any browser but Firefox and you'll see that the cloud
Is there a simple possibility to check if the DataGrid is currently in EditMode
I have four product gallery with the possibility to check the detail of each
Is there a possibility to check if something is a partial function in Clojure?
Is there a possibility to check if two python functions are interchangeable? For instance,
Is there a possibility that you can check a string if it needs to
I'd like to check if directory is empty in Java. But there is a
Is there a possibility to check if a mongo database allready exists?
(SOLVED) I'm building an application that can create some of its control dynamically, based

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.