直接看代码: <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8">…
创建Google API Key, Creating a Google API Key
To read events from your public Google Calendars you’ll need create a Google API key and save within your plugin settings.
Here are step-by-step instructions to create and save a Google API key:
1Navigate to the Google Developers Console.
2 From the top Project menu select Create project.
3Give your project a name, agree to the terms, then click Create.
4From the Google Developers Console Dashboard select Enable API. If you don’t see this, select API Manager from the top-left “hamburger” menu.
5Under Google Apps APIs, select Calendar API. Then click Click Enable.
6Select Credentials under API Manager in the left-hand menu, click Create credentials, then select API key. You can get to the same result using the “Go to Credentials” button, but the screens you’re taken through are a bit different.
7On the API key created popup, select and copy (Cmd-C or Ctrl-C) your newly created API key.
8Now back on your WordPress dashboard, go to Calendars, then Settings from the menu. Enter your Google API key here, making sure you have pasted the exact key without extra spaces. Then click Save Changes.
本文:创建Google API Key, Creating a Google API Key