微信公眾平臺開發(fā)(74) 用戶分組管理
Jun 13, 2016 am 10:17 AM微信公眾平臺開發(fā)?用戶分組管理?分組管理接口?查詢分組 創(chuàng)建分組 修改分組名 移動用戶分組
作者:方倍工作室?
地址:http://www.cnblogs.com/txw1958/p/weixin74-group-manage.html?
?
開發(fā)者可以使用接口,對公眾平臺的分組進(jìn)行查詢、創(chuàng)建、修改操作,也可以使用接口在需要時(shí)移動用戶到某個(gè)分組。
?
創(chuàng)建分組
一個(gè)公眾賬號,最多支持創(chuàng)建500個(gè)分組。?接口調(diào)用請求說明
http請求方式: POST(請使用https協(xié)議) https://api.weixin.qq.com/cgi-bin/groups/create?access_token=ACCESS_TOKEN POST數(shù)據(jù)格式:json POST數(shù)據(jù)例子:{"group":{"name":"test"}}
參數(shù)說明
參數(shù) | 說明 |
---|---|
access_token | 調(diào)用接口憑證 |
name | 分組名字(30個(gè)字符以內(nèi)) |
返回說明 正常時(shí)的返回JSON數(shù)據(jù)包示例:
{ "group": { "id": 107, "name": "test" } }
參數(shù)說明
參數(shù) | 說明 |
---|---|
id | 分組id,由微信分配 |
name | 分組名字,UTF8編碼 |
錯(cuò)誤時(shí)的JSON數(shù)據(jù)包示例(該示例為AppID無效錯(cuò)誤):
{"errcode":40013,"errmsg":"invalid appid"}<br /><br /><br /><br />
創(chuàng)建代碼:
<span $json</span> = '{"group":{"name":"朋友"}}'<span ; </span><span $url</span> = "https://api.weixin.qq.com/cgi-bin/groups/create?access_token=6j68MFz5WyxI2_xrdSj1XfjhZu7c3qTpgC8PrBznfqUbHe8kbaEe_mEDWZi2TdPYpAx9ljJNkmy1B6-A7dPe2y9L7RdwcjN2QKrhOydyOnveek111j7crIrNHzFzuKpii8VpFpizs7YGcwuangkEXg"<span ; </span><span $result</span> = https_post(<span $url</span>,<span $json</span><span ); </span><span var_dump</span>(<span $result</span><span ); </span><span function</span> https_post(<span $url</span>,<span $data</span><span ) { </span><span $curl</span> =<span curl_init(); curl_setopt(</span><span $curl</span>, CURLOPT_URL, <span $url</span><span ); curl_setopt(</span><span $curl</span>, CURLOPT_SSL_VERIFYPEER, <span FALSE</span><span ); curl_setopt(</span><span $curl</span>, CURLOPT_SSL_VERIFYHOST, <span FALSE</span><span ); curl_setopt(</span><span $curl</span>, CURLOPT_POST, 1<span ); curl_setopt(</span><span $curl</span>, CURLOPT_POSTFIELDS, <span $data</span><span ); curl_setopt(</span><span $curl</span>, CURLOPT_RETURNTRANSFER, 1<span ); </span><span $result</span> = curl_exec(<span $curl</span><span ); </span><span if</span> (curl_errno(<span $curl</span><span )) { </span><span return</span> 'Errno'.curl_error(<span $curl</span><span ); } curl_close(</span><span $curl</span><span ); </span><span return</span> <span $result</span><span ; }</span>
返回
<span string</span>(36) "{"group":{"id":100,"name":"朋友"}}"
效果
<br /><br /><br />
============================================
方倍工作室微信公眾平臺賬號關(guān)注方法:
1. 微信通訊錄-添加朋友-查找公眾號-搜索“方倍工作室”
2.
微信通訊錄-添加朋友-搜號碼-輸入“pondbaystudio”
3. 使用微信掃描下面的二維碼

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Nice Comics, an immersive reading experience platform dedicated to creating for comic lovers, brings together a large number of high-quality comic resources at home and abroad. It is not only a comic reading platform, but also a community that connects comic artists and readers and shares comic culture. Through simple and intuitive interface design and powerful search functions, NES Comics allows you to easily find your favorite works and enjoy a smooth and comfortable reading experience. Say goodbye to the long waiting and tedious operations, enter the world of Nice comics immediately and start your comic journey!

Frogman Comics has become the first choice for many comic lovers with its rich and diverse comic resources and convenient and smooth online reading experience. It is like a vibrant pond, with fresh and interesting stories constantly emerging, waiting for you to discover and explore. Frog Man comics cover a variety of subjects, from passionate adventures to sweet love, from fantasy and science fiction to suspense reasoning, no matter which genre you like, you can find your favorite works here. Its simple and intuitive interface design allows you to easily get started, quickly find the comics you want to read, and immerse yourself in the exciting comic world.

Android mobile phone users can download and install Huobi/Huobi App through the following steps: 1. Ensure the network is stable and the storage space is sufficient; 2. Download the App through Huobi/Huobi official website, use the browser to access the official website and click the download link or scan the QR code, or search and download through third-party application stores such as AppTreasure and Huawei App Market, and you can also obtain the installation package through friends' sharing; 3. Find the downloaded .apk file, enable the "Unknown Source App" installation permission, follow the prompts to complete the installation, etc.

Yes, but there are restrictions. ① You can log in to the same account on both iPhone and Android phones, but logging in to the latest device will cause the earliest session to be offline; ② You can log in at the same time on the mobile phone and the computer desktop, but the functions are not synchronized; ③ Although using third-party tools or dual-app functions can enable logging in between two mobile phones, it is unofficially supported and may violate regulations; ④ Alternative solutions include using web version/desktop version to match the main phone, or transferring chat records through cloud backup and file tools. Some Android machines can also use "dual applications" to run two account instances.

The steps for downloading and installing the Yiou Exchange (OKX) Android client are as follows: 1. Download the official genuine installation package through the official website www.okx.com or the official QR code; 2. Find the downloaded .apk file in the mobile phone file manager and enable the "Unknown Source" installation permission; 3. Click the installation package to install, and after the installation is completed, open the APP and register or log in to the account; 4. Set up complex passwords, enable secondary verification, regularly change passwords, properly keep private keys and mnemonics, and beware of phishing websites to ensure account security.

Huobi App is the world's leading digital asset trading platform, providing safe, convenient and professional trading services. As a platform trusted by millions of users around the world, Huobi App supports transactions of various mainstream digital currencies such as Bitcoin and Ethereum, and provides a variety of trading tools such as spot, contracts, and leverage. The latest version of v10.52.0 optimizes the trading engine, improves speed and stability, adds a variety of new trading functions, and strengthens security protection.

In Go, an interface is a type that defines behavior without specifying implementation. An interface consists of method signatures, and any type that implements these methods automatically satisfy the interface. For example, if you define a Speaker interface that contains the Speak() method, all types that implement the method can be considered Speaker. Interfaces are suitable for writing common functions, abstract implementation details, and using mock objects in testing. Defining an interface uses the interface keyword and lists method signatures, without explicitly declaring the type to implement the interface. Common use cases include logs, formatting, abstractions of different databases or services, and notification systems. For example, both Dog and Robot types can implement Speak methods and pass them to the same Anno

HTX (formerly Huobi) launches the latest mobile app, supports Apple and Android systems, and provides real-time market trends, transactions, contract financial management and other functions. Users can download and install them through the official website, TestFlight or the app store.
