Created 多帐号接入 (markdown)

renyang9876 2015-06-07 20:43:36 +08:00
parent 105a490f48
commit 745822e24d

22
多帐号接入.md Normal file

@ -0,0 +1,22 @@
如果你想使用本项目接入多个公众号在本程序中您可以为每个帐号都设置一个id此id对应了该帐号的appid、token等信息。
如下表
<table>
<tr>
<td>id</td>
<td>appid</td>
<td>token</td>
</tr>
<tr>
<td>1</td>
<td>appid1</td>
<td>token1</td>
</tr>
<tr>
<td>2</td>
<td>appid2</td>
<td>token2</td>
</tr>
</table>
在微信公众平台的设置中您可以将您帐号中平台的url设置为 您的网址/?id=xxx如 http://www.example.com/wechat?id=xxx
而在程序入口处根据id查找对应帐号的appid和token传入'Overtrue\Wechat\Server',完成初始化