定制 pixelstudio/wp-google-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pixelstudio/wp-google-api

Composer 安装命令:

composer require pixelstudio/wp-google-api

包简介

[Require Coding] WordPress plugins that provide Google API Client

README 文档

README

This WordPress plugin just provide you with the API Client. It doesn't do anything without coding in your Theme.

For documentation reads: https://github.com/google/google-api-php-client

Requirement

  • PHP version 5.6 or higher
  • WordPress version 4.9.6

Local Testing

You need SSL to make the API works.

If you're in Windows, you can add certificate to your WAMP or XAMPP installation by following these steps:

  1. Download latest certificate from https://curl.haxx.se/docs/caextract.html

  2. Put it in PHP folder like C:\xampp\php\extras\ssl\ or C:\wamp64\bin\php\php7.0.0\extras\ssl

  3. In php.ini file, uncomment "curl.cainfo" and put in the path to your SSL file like curl.cainfo = "C:\xampp\php\extras\ssl\cacert-2018-06-02.pem".

  4. Done your API should now work even without changing your Virtual Host to HTTPS.

For details, read this StackOveflow thread

Displaying Own Calendar

You can skip the OAuth process if only for displaying own calendar. Follow these steps:

  1. I assume you have created API Console with permission to get Calendar API. If not do it here https://console.developers.google.com

  2. Go to Menu > IAM & Admin > Service Accounts. Create a new account, name it anything, and set the role to Project > Viewer. Tick "Furnish new Private key".

  3. You will automatically download a JSON file. Keep this safe because you can't redownload it.

  4. Open your Calendar and grant permission to view for the Service Account's email. If you want to see the Color, you need to grant Read & Write access.

  5. Setup is done. You can find sample code here: https://gist.github.com/hrsetyono/5d8623bd8f28da3e282441ce1314f022

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固