{"id":28641,"date":"2024-11-25T16:52:42","date_gmt":"2024-11-25T08:52:42","guid":{"rendered":"https:\/\/fwq.ai\/blog\/28641\/"},"modified":"2024-11-25T16:52:42","modified_gmt":"2024-11-25T08:52:42","slug":"%e5%be%ae%e4%bf%a1%e5%85%ac%e4%bc%97%e5%b9%b3%e5%8f%b0%e5%bc%80%e5%8f%91%e8%8e%b7%e5%8f%96%e5%85%b3%e6%b3%a8%e8%80%85%e5%88%97%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/28641\/","title":{"rendered":"\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5f00\u53d1\u83b7\u53d6\u5173\u6ce8\u8005\u5217\u8868"},"content":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e0a\u5982\u4f55\u4f7f\u7528\u9ad8\u7ea7\u63a5\u53e3\u5f00\u53d1\u83b7\u53d6\u5173\u6ce8\u8005\u5217\u8868\u7684\u529f\u80fd\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>\u4e00\u3001\u63a5\u53e3\u4ecb\u7ecd<\/strong><\/h2>\n<p>\u516c\u4f17\u53f7\u53ef\u901a\u8fc7\u672c\u63a5\u53e3\u6765\u83b7\u53d6\u5e10\u53f7\u7684\u5173\u6ce8\u8005\u5217\u8868\uff0c\u5173\u6ce8\u8005\u5217\u8868\u7531\u4e00\u4e32OpenID\uff08\u52a0\u5bc6\u540e\u7684\u5fae\u4fe1\u53f7\uff0c\u6bcf\u4e2a\u7528\u6237\u5bf9\u6bcf\u4e2a\u516c\u4f17\u53f7\u7684OpenID\u662f\u552f\u4e00\u7684\uff09\u7ec4\u6210\u3002\u4e00\u6b21\u62c9\u53d6\u8c03\u7528\u6700\u591a\u62c9\u53d610000\u4e2a\u5173\u6ce8\u8005\u7684OpenID\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u6b21\u62c9\u53d6\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002<\/p>\n<p><strong>\u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e<\/strong><\/p>\n<pre>http\u8bf7\u6c42\u65b9\u5f0f: GET\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09\r\nhttps:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<table style=\"width: 640px\" border=\"1\">\n<tbody>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u662f\u5426\u5fc5\u987b<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<tr>\n<td>access_token<\/td>\n<td>\u662f<\/td>\n<td>\u8c03\u7528\u63a5\u53e3\u51ed\u8bc1<\/td>\n<\/tr>\n<tr>\n<td>next_openid<\/td>\n<td>\u662f<\/td>\n<td>\u7b2c\u4e00\u4e2a\u62c9\u53d6\u7684OPENID\uff0c\u4e0d\u586b\u9ed8\u8ba4\u4ece\u5934\u5f00\u59cb\u62c9\u53d6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u8fd4\u56de\u8bf4\u660e<\/strong><\/p>\n<p>\u6b63\u786e\u65f6\u8fd4\u56deJSON\u6570\u636e\u5305\uff1a<\/p>\n<\/p>\n<pre>{\"total\":2,\"count\":2,\"data\":{\"openid\":[\"\",\"OPENID1\",\"OPENID2\"]},\"next_openid\":\"NEXT_OPENID\"}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<table style=\"width: 640px\" border=\"1\">\n<tbody>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<tr>\n<td>total<\/td>\n<td>\u5173\u6ce8\u8be5\u516c\u4f17\u8d26\u53f7\u7684\u603b\u7528\u6237\u6570<\/td>\n<\/tr>\n<tr>\n<td>count<\/td>\n<td>\u62c9\u53d6\u7684OPENID\u4e2a\u6570\uff0c\u6700\u5927\u503c\u4e3a10000<\/td>\n<\/tr>\n<tr>\n<td>data<\/td>\n<td>\u5217\u8868\u6570\u636e\uff0cOPENID\u7684\u5217\u8868<\/td>\n<\/tr>\n<tr>\n<td>next_openid<\/td>\n<td>\u62c9\u53d6\u5217\u8868\u7684\u540e\u4e00\u4e2a\u7528\u6237\u7684OPENID<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9519\u8bef\u65f6\u8fd4\u56deJSON\u6570\u636e\u5305\uff08\u793a\u4f8b\u4e3a\u65e0\u6548AppID\u9519\u8bef\uff09\uff1a<\/p>\n<pre>{\"errcode\":40013,\"errmsg\":\"invalid appid\"}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><strong>\u9644\uff1a\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6<\/strong><\/p>\n<p>\u5f53\u516c\u4f17\u53f7\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6\uff0c\u53ef\u901a\u8fc7\u586b\u5199next_openid\u7684\u503c\uff0c\u4ece\u800c\u591a\u6b21\u62c9\u53d6\u5217\u8868\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002<\/p>\n<p>\u5177\u4f53\u800c\u8a00\uff0c\u5c31\u662f\u5728\u8c03\u7528\u63a5\u53e3\u65f6\uff0c\u5c06\u4e0a\u4e00\u6b21\u8c03\u7528\u5f97\u5230\u7684\u8fd4\u56de\u4e2d\u7684next_openid\u503c\uff0c\u4f5c\u4e3a\u4e0b\u4e00\u6b21\u8c03\u7528\u4e2d\u7684next_openid\u503c\u3002<\/p>\n<p>\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre>\u516c\u4f17\u8d26\u53f7A\u62e5\u670923000\u4e2a\u5173\u6ce8\u7684\u4eba\uff0c\u60f3\u901a\u8fc7\u62c9\u53d6\u5173\u6ce8\u63a5\u53e3\u83b7\u53d6\u6240\u6709\u5173\u6ce8\u7684\u4eba\uff0c\u90a3\u4e48\u5206\u522b\u8bf7\u6c42url\u5982\u4e0b\uff1a\r\nhttps:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN \r\n\u8fd4\u56de\u7ed3\u679c:<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<pre>{\r\n  \"total\":23000,\r\n  \"count\":10000,\r\n  \"data\":{\"\r\n     openid\":[\r\n        \"OPENID1\",\r\n        \"OPENID2\",\r\n        ...,\r\n        \"OPENID10000\"\r\n     ]\r\n   },\r\n   \"next_openid\":\"NEXT_OPENID1\"\r\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<pre>https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID1\r\n\u8fd4\u56de\u7ed3\u679c:<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<pre>{   \"total\":23000,\r\n   \"count\":10000,\r\n   \"data\":{     \"openid\":[       \"OPENID10001\",\r\n       \"OPENID10002\",\r\n       ...,\r\n       \"OPENID20000\"\r\n     ]\r\n   },\r\n   \"next_openid\":\"NEXT_OPENID2\"}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<pre>https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID1\r\n\u8fd4\u56de\u7ed3\u679c\uff08\u5173\u6ce8\u8005\u5217\u8868\u5df2\u8fd4\u56de\u5b8c\u65f6\uff0c\u8fd4\u56denext_openid\u4e3a\u7a7a\uff09:<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<pre>$access_token = \"\";\r\n\r\n$url = \"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=$access_token\";\r\n$result = https_request($url);\r\n$jsoninfo = json_decode($result, true);\r\nvar_dump($result);<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<h2>\u4e8c\u3001\u7a0b\u5e8f\u5b9e\u73b0<\/h2>\n<\/p>\n<pre> = \"\" = \"https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=\" = https_request( = json_decode(, (<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u62db\u884c\u540e\uff0c\u8fd4\u56de\u7c7b\u4f3c\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<pre>{\r\n   \"total\":23000,\r\n   \"count\":10000,\r\n   \"data\":{\r\n     \"openid\":[\r\n       \"OPENID10001\",\r\n       \"OPENID10002\",\r\n       ...,\r\n       \"OPENID20000\"\r\n     ]\r\n   },\r\n   \"next_openid\":\"NEXT_OPENID2\"\r\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5bf9\u4e8e\u8d85\u8fc71\u4e07\u4ee5\u540e\u7684\u6570\uff0c\u5faa\u73af\u6267\u884c\u4e0a\u8ff0\u7a0b\u5e8f\u5373\u53ef\uff0c\u5c06\u8fd9\u4e9bopenid\u5b58\u5165\u6570\u636e\u5e93\uff0c\u5c31\u83b7\u5f97\u4e86\u5173\u6ce8\u8005\u7684\u5217\u8868\u3002<\/p>\n<p>\u8be5\u63a5\u53e3\u7684\u4f5c\u7528\u4e3b\u8981\u662f\u914d\u5408\u83b7\u53d6\u7528\u6237\u57fa\u672c\u4fe1\u606f\u4ee5\u53ca\u7528\u6237\u5206\u7ec4\u63a5\u53e3\uff0c\u83b7\u5f97\u6240\u6709\u5173\u6ce8\u8005\u7684\u57fa\u672c\u4fe1\u606f\u53ca\u5206\u7ec4\u3002<\/p>\n<p>&nbsp;\u66f4\u591a\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u5f00\u53d1\u83b7\u53d6\u5173\u6ce8\u8005\u5217\u8868\u76f8\u5173\u6587\u7ae0\u8bf7\u5173\u6ce8PHP\u4e2d\u6587\u7f51\uff01<\/p>\n<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4ecb\u7ecd\u5728\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0\u4e0a\u5982\u4f55\u4f7f\u7528\u9ad8\u7ea7\u63a5\u53e3\u5f00\u53d1\u83b7\u53d6\u5173\u6ce8\u8005\u5217\u8868\u7684\u529f\u80fd\u3002 &nbsp; \u4e00\u3001\u63a5\u53e3\u4ecb\u7ecd \u516c\u4f17\u53f7\u53ef\u901a\u8fc7\u672c\u63a5\u53e3\u6765\u83b7\u53d6\u5e10\u53f7\u7684\u5173\u6ce8\u8005\u5217\u8868\uff0c\u5173\u6ce8\u8005\u5217\u8868\u7531\u4e00\u4e32OpenID\uff08\u52a0\u5bc6\u540e\u7684\u5fae\u4fe1\u53f7\uff0c\u6bcf\u4e2a\u7528\u6237\u5bf9\u6bcf\u4e2a\u516c\u4f17\u53f7\u7684OpenID\u662f\u552f\u4e00\u7684\uff09\u7ec4\u6210\u3002\u4e00\u6b21\u62c9\u53d6\u8c03\u7528\u6700\u591a\u62c9\u53d610000\u4e2a\u5173\u6ce8\u8005\u7684OpenID\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u6b21\u62c9\u53d6\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002 \u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e http\u8bf7\u6c42\u65b9\u5f0f: GET\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09 https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN&amp;next_openid=NEXT_OPENID \u767b\u5f55\u540e\u590d\u5236 \u53c2\u6570 \u662f\u5426\u5fc5\u987b \u8bf4\u660e access_token \u662f \u8c03\u7528\u63a5\u53e3\u51ed\u8bc1 next_openid \u662f \u7b2c\u4e00\u4e2a\u62c9\u53d6\u7684OPENID\uff0c\u4e0d\u586b\u9ed8\u8ba4\u4ece\u5934\u5f00\u59cb\u62c9\u53d6 \u8fd4\u56de\u8bf4\u660e \u6b63\u786e\u65f6\u8fd4\u56deJSON\u6570\u636e\u5305\uff1a {&#8220;total&#8221;:2,&#8221;count&#8221;:2,&#8221;data&#8221;:{&#8220;openid&#8221;:[&#8220;&#8221;,&#8221;OPENID1&#8243;,&#8221;OPENID2&#8243;]},&#8221;next_openid&#8221;:&#8221;NEXT_OPENID&#8221;} \u767b\u5f55\u540e\u590d\u5236 \u53c2\u6570 \u8bf4\u660e total \u5173\u6ce8\u8be5\u516c\u4f17\u8d26\u53f7\u7684\u603b\u7528\u6237\u6570 count \u62c9\u53d6\u7684OPENID\u4e2a\u6570\uff0c\u6700\u5927\u503c\u4e3a10000 data \u5217\u8868\u6570\u636e\uff0cOPENID\u7684\u5217\u8868 next_openid \u62c9\u53d6\u5217\u8868\u7684\u540e\u4e00\u4e2a\u7528\u6237\u7684OPENID \u9519\u8bef\u65f6\u8fd4\u56deJSON\u6570\u636e\u5305\uff08\u793a\u4f8b\u4e3a\u65e0\u6548AppID\u9519\u8bef\uff09\uff1a {&#8220;errcode&#8221;:40013,&#8221;errmsg&#8221;:&#8221;invalid appid&#8221;} \u767b\u5f55\u540e\u590d\u5236 \u9644\uff1a\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6 \u5f53\u516c\u4f17\u53f7\u5173\u6ce8\u8005\u6570\u91cf\u8d85\u8fc710000\u65f6\uff0c\u53ef\u901a\u8fc7\u586b\u5199next_openid\u7684\u503c\uff0c\u4ece\u800c\u591a\u6b21\u62c9\u53d6\u5217\u8868\u7684\u65b9\u5f0f\u6765\u6ee1\u8db3\u9700\u6c42\u3002 \u5177\u4f53\u800c\u8a00\uff0c\u5c31\u662f\u5728\u8c03\u7528\u63a5\u53e3\u65f6\uff0c\u5c06\u4e0a\u4e00\u6b21\u8c03\u7528\u5f97\u5230\u7684\u8fd4\u56de\u4e2d\u7684next_openid\u503c\uff0c\u4f5c\u4e3a\u4e0b\u4e00\u6b21\u8c03\u7528\u4e2d\u7684next_openid\u503c\u3002 \u793a\u4f8b\u5982\u4e0b\uff1a \u516c\u4f17\u8d26\u53f7A\u62e5\u670923000\u4e2a\u5173\u6ce8\u7684\u4eba\uff0c\u60f3\u901a\u8fc7\u62c9\u53d6\u5173\u6ce8\u63a5\u53e3\u83b7\u53d6\u6240\u6709\u5173\u6ce8\u7684\u4eba\uff0c\u90a3\u4e48\u5206\u522b\u8bf7\u6c42url\u5982\u4e0b\uff1a https:\/\/api.weixin.qq.com\/cgi-bin\/user\/get?access_token=ACCESS_TOKEN \u8fd4\u56de\u7ed3\u679c: \u767b\u5f55\u540e\u590d\u5236 { &#8220;total&#8221;:23000, &#8220;count&#8221;:10000, &#8220;data&#8221;:{&#8221; openid&#8221;:[ &#8220;OPENID1&#8221;, &#8220;OPENID2&#8221;, &#8230;, &#8220;OPENID10000&#8221; ] }, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-28641","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=28641"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28641\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=28641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=28641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=28641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}