Giter Site home page Giter Site logo

blex-li / wechat-robot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangvsa/wechat-robot

0.0 1.0 0.0 2.17 MB

微信机器人是一个php插件,实现了主站和微信公众号的连接,支持自定义菜单、自动回复、文章搜索、订阅回复等功能。

License: MIT License

PHP 100.00%

wechat-robot's Introduction

Wechat Robot

Wechat Robot是一个WordPress插件,实现了WP站点和微信公众号的连接,支持自动回复、文章搜索、订阅回复、微社区入口等功能。 Wechat Robot使用PHP语言,稍作改动可以即可以在非Wordpress环境下使用。

功能列表

  • 自定义菜单
  • 访问WP网站
  • 查看最新文章
  • 查看随机文章
  • 查看热门文章
  • 关键字搜索
  • 访问FB社区
  • 订阅时显示欢迎菜单

功能截图

本插件原为Freebuf编写,在这直接用Freebuf公众号演示,大家也可以微信关注Freebuf自己体验。

  • 自定义菜单
    自定义菜单
  • 显示欢迎菜单,输入任何不被识别的字符串均可
    菜单
  • 回复0可以访问主站
    访问主站
  • 回复1查看最新文章
    最新文章)
  • 回复2查看随机文章
    随机文章
  • 回复3查看热门文章(本月)
    热门文章
  • 回复4+关键字进行搜索
    搜索文章
  • 回复5访问FB社区
    访问FB社区

安装使用

  1. 下载本插件,编辑文件wechat-robot.php
  • 修改WechatRobot构造函数参数中的appidsecret
  • 若支持菜单则参照微信API填写create_menu中的菜单参数,然后按需修改onClick函数来响应菜单点击事件。
  • 若不支持菜单,则注释掉create_menu调用即可。
  • 按需修改onText函数和onSubscribe函数,响应用户信息和订阅事件。
  1. 将wechat-robot目录上传到WP目录/wp-content/plugins/,然后在WP后台开启本插件。
  2. 进入微信公众账号后台,开启高级功能->开发模式,填写token和url
    token填写wechat,url填写你的网站地址/?wechat,比如http://www.freebuf.com/?wechat,注意不要省略http://

详细文档

API wiki

wechat-robot's People

Contributors

wangvsa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.