Giter VIP home page Giter VIP logo

weixinapi's Introduction

weixinapi

Java实现的微信API接口SDK

LICENSE 996.icu

注意:拒绝996工作制公司请使用本项目。

开发者

作者: marker

邮箱:[email protected]

博客:http://www.yl-blog.com

微信公众号:(欢迎关注支持)

Maven 坐标

<dependency>
   <groupId>com.wuweibi</groupId>
    <artifactId>weixinapi</artifactId>
    <version>0.0.1</version>
</dependency>

项目介绍

微信公众平台 相信大家也不陌生,官方网站提供了一个简单的php程序Demo 因为微信平台采用HTTP方式承载微信的协议,而且不是双向通讯,也就是说只能由微信服务器主动请求我们的服务器。其实当你使用我开发的weixinapi包,你不用关心那么多的,呵呵。 看了api文档很久一段事件,今天突然恍然大雾,然后weixinapi的java版出来了

此api结合我之前从事通讯协议方面经验,采用Session抽象类方式+消息对象模式开发

【实现功能】: 接收微信服务器的文本消息、图片消息、事件消息、链接消息、地理位置消息等功能, 调用callback()响应回复文本消息、音乐消息、图文消息 。 微信菜单接口实现:创建、删除、查询

使用条件:

方案一:有自己的服务器,公网IP + 80端口

方案二:使用Ngrok内网穿透调试;

欢迎大家关注我的微信公众号!!!(暂时没做功能,未来会有功能的,先关注到嘛,毕竟500个关注可以认证实现高级功能)

微信公众平台:http://mp.weixin.qq.com

=============================================== 根据@tds的建议,我将微信API增加了HandleMessageListener监听器和HandleMessageAdapter适配器 微信服务器发送http请求过来后,会调用注册的所有监听器,的对应on方法(已然有模仿这种模式的三方微信SDK了,可见此模式的优越性,呵呵)。

【具体代码看Demo】 这样做的好处,你可以分散你的消息回复处理,放在不同的监听器中,方便代码管理与维护。

【更新】 ----------------------完成官方2018-01-05更新的消息接口------------------------

[2019-11-20] 新增API调用接口:微信模板消息对接WeixinApiUtils

[2018-02-05] 新增API调用接口:卡券创建、卡券投放二维码生成

[2018-02-04] 新增JSAPI调用接口、Web授权获取功能

[2014-08-30] 添加了微信推出已久的菜单创建、删除、查询API

[2013-11-11] 更新了音乐消息的回复

[2013-11-11] 更新了视频消息的收发。

[2013-11-11] 更新了语音消息和语音识别消息兼容问题。

[2013-11-11] 更新了文本消息的属性,去除了funcFlag属性

[2013-11-11] 更新了图片消息的接收解析和被动发送解析,去除了funcFlag属性。

[2013-11-08] 添加了10月29日微信官方API中的视频消息

[2013-11-08] 添加了10月29日微信官方API中的语音识别消息

[2013-11-08] 更新了微信API最新接收事件推送{已关注事件推送、上报地理位置事件推送}接口

代码例子(在开源**发布的):

http://www.oschina.net/code/snippet_218887_22896

weixinapi's People

Contributors

wuweiit avatar dependabot[bot] 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.