Hi,
 
Unlike many here, I am relatively new to Google APIs, so I beg your 
patience.
 
I am currently tasked with implementing a mapping system which will use 
Fusion Tables.  I have successfully uploaded tables using the Google UI, and 
written my code to display the map and the FusionTables layer.  However, I 
now need to be able to update the tables programmatically rather than 
through the Google UI.  Clearly this means being able to get my application 
to log in and upload the data, but I am currently not having any success 
with the login process.
 
I am sending a POST request to the Google accounts service using VB as 
follows (stripped down to its basics)...
 
        Dim webRequest As WebRequest = webRequest.Create("
https://www.google.com/accounts/ClientLogin";)
        webRequest.Method = "POST"
        webRequest.ContentType = "application/x-www-form-urlencoded"
       
        Dim requestStream As Stream = webRequest.GetRequestStream()
        Dim streamWriter As StreamWriter = New StreamWriter(requestStream)
        streamWriter.Write(Server.UrlEncode("
accountType=GOOGLE&Email=<MyEmail>&Passwd=<MyPassword>&service=fusiontables&source=<MyApplicationName>
"))
        streamWriter.Flush()
        streamWriter.Close()
        requestStream.Close()
      
       ' Get the response from the remote server...
       Dim webResponse As WebResponse = webRequest.GetResponse()
        .......
 
Where <MyEmal> is my Google account email address, <MyPassword> is my Google 
account password, and <MyApplicationName> is something I made up to 
represent the application.
 
The GetResponse() is throwing a 403 "Forbidden" *exception* whether I 
include the content or not.  I did expect from the documentation that I 
should get a response with an error message and a "url giving more 
information".
 
My questions are...
 
1)  Am I correct in thinking that I should be authenticating using my Google 
account credentials, or are special credentials required for using Fusion 
Tables?
 
2)  If special credentials are required, how do I go about obtaining these?
 
3)  If sepecial credentials are not required, can anyone point out any 
problems with the above code?  I have redirected the url to one of our own 
sites and the posted content certainly looks exactly as it should!
 
Many thanks in advance, David.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to