這是我的代碼,按照'fusion_tables' gem documentation。顯然,我不會在此代碼中發佈我的用戶名和密碼。爲什麼使用Ruby gem'fusion_tables'創建Fusion Table時出現403錯誤?
require 'fusion_tables'
@ft = GData::Client::FusionTables.new
@ft.clientlogin(my_google_account_name, my_google_account_password)
# Creating a new table
columns = [
{
:name=>"column_1",
:type=>'string'
},
{
:name=>"column_2",
:type=>'number'
}
]
new_table = @ft.create_table "Ruby table",columns
# Inserting rows
data = [
{
"column_1"=>"This is a string",
"column_2"=>100
}
]
new_table.insert data
當我運行它,我得到這個錯誤:
<HEAD>
<TITLE>User does not have permission to view the underlying data</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>User does not have permission to view the underlying data</H1>
<H2>Error 403</H2>
</BODY>
</HTML>
我該如何解決這個問題?
現在問題已經解決:https://github.com/tokumine/fusion_tables/issues/19 –