2

I'm just getting started looking at the Google Analytics API which should allow me to embed some Analytics data into a page. I have found two pages containing almost identical demo code, both created by Google themselves:

and neither of them works. Nothing loads, and the error message in the Console is:

Refused to display 'https://accounts.google.com/o/oauth2/auth?client_id=MY_CLIENT_ID&origin=MY_URL&state=1729197785%7C0.713338618&authuser=0' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Can anyone explain why this would be? The Client ID isn't the problem, I've double-checked, and there are no restrictions on referrers. This happens when the code is place in a live public web page, not locally on an intranet or localhost page.

AmbroseChapel
  • 11,957
  • 7
  • 46
  • 68
  • Do you have a link to the live page? – Philip Walton Apr 24 '15 at 01:35
  • I can make another one in about five minutes I guess, but I don't think it will tell you anything more than you see above. – AmbroseChapel Apr 27 '15 at 07:33
  • Well, based on what I've seen above, I'm not sure what the problem is. So if you don't link me to to a demo, I'm not sure how else I can help you. – Philip Walton Apr 27 '15 at 15:58
  • The problem is, as you can read above, "Nothing loads, and the error message in the Console is: Refused to display 'https://accounts.google.com/o/oauth2/auth?client_id=MY_CLIENT_ID&origin=MY_URL&state=1729197785%7C0.713338618&authuser=0' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'." Not sure what you need. Also you could just download the code from the URLs provided and test it for yourself in about 30 seconds. – AmbroseChapel Apr 29 '15 at 04:28
  • 1
    I have tried it, and it works for me. Have you tried this? http://stackoverflow.com/questions/24681594/google-api-400-bad-request-and-refused-to-display-in-a-frame-because-i – Philip Walton Apr 29 '15 at 16:15

0 Answers0