Reputation: 99
I'm trying to get tabletop.js working for the first time. Tabletop.js lets you use Google spreadsheets as the data source for a web page.
When I run my code, which is here on github
I get the following error:
GET https://spreadsheets.google.com/feeds/worksheets/0AppPPX-L4ABKdExWaVBqWFFuV…/basic?alt=json-in-script&callback=Tabletop.callbacks.tt136672522586174055 400 (Bad Request) tabletop.js:184
Tabletop.js line 184 reads as follows:
document.getElementsByTagName('script')[0].parentNode.appendChild(script);
The google spreadsheet is public and is right here:
https://docs.google.com/spreadsheet/ccc?key=0AppPPX-L4ABKdExWaVBqWFFuVnFYU0Y1OHUwc0dNb3c#gid=0
Upvotes: 1
Views: 2614
Reputation: 99
I wanted you to know that I got an answer to my question from Jonathan Soma, developer of tabletop.js. Here's a link to his solution: https://twitter.com/dangerscarf/status/326878697284067329
It turns out that making a spreadsheet public via the 'Share' button is a different thing than 'Publish to the Web' via the File menu in Google Docs/Drive. You have to do BOTH of these things (make the spreadsheet public AND publish it to the web) for it to work.
Upvotes: 2
Reputation: 378
I have no proof of this, but having a dash in a Google Spreadsheet key may muck something up on Tabletop's end (edit: or Google's end). None of my keys have ever had a dash, and substituting one of my speadsheets into your code gives a proper response.
I'm looking through Tabletop's code, but for now, it might be worth it to create another Google Spreadsheet and hope it doesn't have a dash in its key.
Upvotes: 0
Reputation: 188
im betting its an error in your URL.
https://github.com/jsoma/tabletop
specifically where it says:
In Google Docs, then go up to the File menu and pick Publish to the web. Fiddle with whatever you want, then click Start publishing. A URL will appear, something like https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AmYzu_s7QHsmdDNZUzRlYldnWTZCLXdrMXlYQzVxSFE&output=html
Copy that! In theory you're interested in the part between key= and & but you can use the whole thing if you want.
Upvotes: 1