Ken
Ken

Reputation: 4887

Google file picker example breaks when you choose different view e.g. google.picker.ViewId.DOCS

I've gotten the google file picker example to work. The example uses the photos view and that works fine. But when I change the view to e.g. google.picker.ViewId.DOCS. Iget a javascript error;

Uncaught SyntaxError: Unexpected token ILLEGAL 

I'm using the correct scope (https://www.googleapis.com/auth/drive) according to the documentation. What am I doing wrong.

Upvotes: 3

Views: 230

Answers (1)

Ken
Ken

Reputation: 4887

The problem is I was cut-and-pasting the view name from the developers guide. Unfortunately, the view names in the guide all contained a hidden character, the ZERO WIDTH SPACE. The character didn't appear in my editor, but was screwing up the javascript interpreter. I only spotted it in the chrome debugger tools as a red dot in my code

Upvotes: 4

Related Questions