WeChat development: Tutorial on accesstoken to obtain user fan list

PHPz
Release: 2017-05-01 17:36:01
Original
2894 people have browsed it

In the previous chapter, we explained that open_id obtains basic user information, so where does open_id come from? It can be seen in the fan list. This time I will explain how to get the fan list.

To obtain the fan list, you can view the document http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140840&token=&lang=zh_CN

The explanation is very detailed and obtained through next_openid Download 10,000. Generally, you need to do this when there are more than 10,000 fans. It is not necessary when the number of fans is small. Call the URL interface:

Request method: GET (please use https protocol)

https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID

The code is as follows:

The return result is as follows:

You can get the next 1000 according to next_openid Stop fetching until the count of fetched data is empty.

The above is the detailed content of WeChat development: Tutorial on accesstoken to obtain user fan list. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!