WeChat 개발 노트 - 사용자 정의 공유 인터페이스 호출
소개:
우리는 직장에서 마이크로사이트라고 불리는 WeChat 웹사이트를 개발합니다. 마이크로사이트의 공유 콘텐츠는 시스템에서 자동으로 선택한 현재 URL이므로 고객은 공유 콘텐츠를 변경해야 합니다. 즉, 화면 오른쪽 상단에 있는 공유 버튼을 클릭하고 친구에게 보내기 또는 모멘트로 보내기를 선택하세요. 콘텐츠와 사진을 맞춤설정해야 합니다. 그래서 WeChat JS-SDK Documentation 문서와 웹사이트에 있는 많은 전문가들의 경험을 찾아보니 통화 단계는 대체적으로 알고 있었지만 통화를 성공시키는 방법은 잘 이해가 되지 않았습니다. 몇 가지 실험 끝에 Send to Friends와 Send to Moments의 두 가지 인터페이스가 마침내 성공적으로 호출되었습니다. 통화의 구체적인 프로세스가 여기에 기록됩니다.
1단계: js 파일을 참조합니다.
JS 인터페이스를 호출해야 하는 페이지에 다음 JS 파일을 삽입합니다(https 지원): http://res.wx.qq.com/open/js/jweixin-1.0.0.js
2단계: 구성 인터페이스를 통해 권한 확인 구성 삽입
wx.config({ debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId: '', // 必填,公众号的唯一标识 timestamp: , // 必填,生成签名的时间戳 nonceStr: '', // 必填,生成签名的随机串 signature: '',// 必填,签名,见附录1 jsApiList: [] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 });
다수 인터넷상의 네티즌들도 이런 글을 썼는데 구체적인 구성에 대해서는 거의 이야기가 없습니다. 다음으로 이 글에서 어떻게 부르는지 소개하겠습니다.
디버그와 appId는 말할 필요도 없이 매우 간단합니다.
timespan은 서명된 타임스탬프를 생성합니다.
/// <summary> /// 生成时间戳 /// 从 1970 年 1 月 1 日 00:00:00 至今的秒数,即当前的时间,且最终需要转换为字符串形式 /// </summary> /// <returns></returns> public string getTimestamp() { TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0); return Convert.ToInt64(ts.TotalSeconds).ToString(); }
nonceStr은 서명된 임의 문자열을 생성합니다.
/// <summary> /// 生成随机字符串 /// </summary> /// <returns></returns> public string getNoncestr() { Random random = new Random(); return MD5Util.GetMD5(random.Next(1000).ToString(), "GBK"); }
/// <summary> /// MD5Util 的摘要说明。 /// </summary> public class MD5Util { public MD5Util() { // // TODO: 在此处添加构造函数逻辑 // } /** 获取大写的MD5签名结果 */ public static string GetMD5(string encypStr, string charset) { string retStr; MD5CryptoServiceProvider m5 = new MD5CryptoServiceProvider(); //创建md5对象 byte[] inputBye; byte[] outputBye; //使用GB2312编码方式把字符串转化为字节数组. try { inputBye = Encoding.GetEncoding(charset).GetBytes(encypStr); } catch (Exception ex) { inputBye = Encoding.GetEncoding("GB2312").GetBytes(encypStr); } outputBye = m5.ComputeHash(inputBye); retStr = System.BitConverter.ToString(outputBye); retStr = retStr.Replace("-", "").ToUpper(); return retStr; } }
코드 보기
rree
싱글 시그니처 생성이 더 귀찮습니다.
먼저 access_token을 생성하고 획득하세요(유효 기간은 7200초, 개발자는 자신의 서비스에서 전역적으로 access_token을 캐시해야 합니다)
/// <summary> /// MD5Util 的摘要说明。 /// </summary> public class MD5Util { public MD5Util() { // // TODO: 在此处添加构造函数逻辑 // } /** 获取大写的MD5签名结果 */ public static string GetMD5(string encypStr, string charset) { string retStr; MD5CryptoServiceProvider m5 = new MD5CryptoServiceProvider(); //创建md5对象 byte[] inputBye; byte[] outputBye; //使用GB2312编码方式把字符串转化为字节数组. try { inputBye = Encoding.GetEncoding(charset).GetBytes(encypStr); } catch (Exception ex) { inputBye = Encoding.GetEncoding("GB2312").GetBytes(encypStr); } outputBye = m5.ComputeHash(inputBye); retStr = System.BitConverter.ToString(outputBye); retStr = retStr.Replace("-", "").ToUpper(); return retStr; } }
코드 보기
public string Getaccesstoken() { string appid = System.Configuration.ConfigurationManager.AppSettings["WXZjAppID"].ToString(); string secret = System.Configuration.ConfigurationManager.AppSettings["WXZjAppSecret"].ToString(); string urljson = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret; string strjson = ""; UTF8Encoding encoding = new UTF8Encoding(); HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(urljson); myRequest.Method = "GET"; myRequest.ContentType = "application/x-www-form-urlencoded"; HttpWebResponse response; Stream responseStream; StreamReader reader; string srcString; response = myRequest.GetResponse() as HttpWebResponse; responseStream = response.GetResponseStream(); reader = new System.IO.StreamReader(responseStream, Encoding.UTF8); srcString = reader.ReadToEnd(); reader.Close(); if (srcString.Contains("access_token")) { //CommonJsonModel model = new CommonJsonModel(srcString); HP.CPS.BLL.WeiXin.CommonJsonModel model = new BLL.WeiXin.CommonJsonModel(srcString); strjson = model.GetValue("access_token"); Session["access_tokenzj"] = strjson; } return strjson; }
그런 다음 jsapi_ticket을 가져옵니다.
첫 번째 단계에서 얻은 access_token을 사용하여 http GET을 사용하여 jsapi_ticket을 요청합니다. 메서드( 유효 기간은 7200초이며 개발자는 자신의 서비스에서 jsapi_ticket을 전역적으로 캐시해야 합니다)
public class CommonJsonModelAnalyzer { protected string _GetKey(string rawjson) { if (string.IsNullOrEmpty(rawjson)) return rawjson; rawjson = rawjson.Trim(); string[] jsons = rawjson.Split(new char[] { ':' }); if (jsons.Length < 2) return rawjson; return jsons[0].Replace("\"", "").Trim(); } protected string _GetValue(string rawjson) { if (string.IsNullOrEmpty(rawjson)) return rawjson; rawjson = rawjson.Trim(); string[] jsons = rawjson.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries); if (jsons.Length < 2) return rawjson; StringBuilder builder = new StringBuilder(); for (int i = 1; i < jsons.Length; i++) { builder.Append(jsons[i]); builder.Append(":"); } if (builder.Length > 0) builder.Remove(builder.Length - 1, 1); string value = builder.ToString(); if (value.StartsWith("\"")) value = value.Substring(1); if (value.EndsWith("\"")) value = value.Substring(0, value.Length - 1); return value; } protected List<string> _GetCollection(string rawjson) { //[{},{}] List<string> list = new List<string>(); if (string.IsNullOrEmpty(rawjson)) return list; rawjson = rawjson.Trim(); StringBuilder builder = new StringBuilder(); int nestlevel = -1; int mnestlevel = -1; for (int i = 0; i < rawjson.Length; i++) { if (i == 0) continue; else if (i == rawjson.Length - 1) continue; char jsonchar = rawjson[i]; if (jsonchar == '{') { nestlevel++; } if (jsonchar == '}') { nestlevel--; } if (jsonchar == '[') { mnestlevel++; } if (jsonchar == ']') { mnestlevel--; } if (jsonchar == ',' && nestlevel == -1 && mnestlevel == -1) { list.Add(builder.ToString()); builder = new StringBuilder(); } else { builder.Append(jsonchar); } } if (builder.Length > 0) list.Add(builder.ToString()); return list; } } public class CommonJsonModel : CommonJsonModelAnalyzer { private string rawjson; private bool isValue = false; private bool isModel = false; private bool isCollection = false; public CommonJsonModel(string rawjson) { this.rawjson = rawjson; if (string.IsNullOrEmpty(rawjson)) throw new Exception("missing rawjson"); rawjson = rawjson.Trim(); if (rawjson.StartsWith("{")) { isModel = true; } else if (rawjson.StartsWith("[")) { isCollection = true; } else { isValue = true; } } public string Rawjson { get { return rawjson; } } public bool IsValue() { return isValue; } public bool IsValue(string key) { if (!isModel) return false; if (string.IsNullOrEmpty(key)) return false; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); return submodel.IsValue(); } } return false; } public bool IsModel() { return isModel; } public bool IsModel(string key) { if (!isModel) return false; if (string.IsNullOrEmpty(key)) return false; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); return submodel.IsModel(); } } return false; } public bool IsCollection() { return isCollection; } public bool IsCollection(string key) { if (!isModel) return false; if (string.IsNullOrEmpty(key)) return false; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); return submodel.IsCollection(); } } return false; } /// <summary> /// 当模型是对象,返回拥有的key /// </summary> /// <returns></returns> public List<string> GetKeys() { if (!isModel) return null; List<string> list = new List<string>(); foreach (string subjson in base._GetCollection(this.rawjson)) { string key = new CommonJsonModel(subjson).Key; if (!string.IsNullOrEmpty(key)) list.Add(key); } return list; } /// <summary> /// 当模型是对象,key对应是值,则返回key对应的值 /// </summary> /// <param name="key"></param> /// <returns></returns> public string GetValue(string key) { if (!isModel) return null; if (string.IsNullOrEmpty(key)) return null; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) return model.Value; } return null; } /// <summary> /// 模型是对象,key对应是对象,返回key对应的对象 /// </summary> /// <param name="key"></param> /// <returns></returns> public CommonJsonModel GetModel(string key) { if (!isModel) return null; if (string.IsNullOrEmpty(key)) return null; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); if (!submodel.IsModel()) return null; else return submodel; } } return null; } /// <summary> /// 模型是对象,key对应是集合,返回集合 /// </summary> /// <param name="key"></param> /// <returns></returns> public CommonJsonModel GetCollection(string key) { if (!isModel) return null; if (string.IsNullOrEmpty(key)) return null; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); if (!submodel.IsCollection()) return null; else return submodel; } } return null; } /// <summary> /// 模型是集合,返回自身 /// </summary> /// <returns></returns> public List<CommonJsonModel> GetCollection() { List<CommonJsonModel> list = new List<CommonJsonModel>(); if (IsValue()) return list; foreach (string subjson in base._GetCollection(rawjson)) { list.Add(new CommonJsonModel(subjson)); } return list; } /// <summary> /// 当模型是值对象,返回key /// </summary> private string Key { get { if (IsValue()) return base._GetKey(rawjson); return null; } } /// <summary> /// 当模型是值对象,返回value /// </summary> private string Value { get { if (!IsValue()) return null; return base._GetValue(rawjson); } } }
마지막으로 서명 생성:
public class CommonJsonModelAnalyzer { protected string _GetKey(string rawjson) { if (string.IsNullOrEmpty(rawjson)) return rawjson; rawjson = rawjson.Trim(); string[] jsons = rawjson.Split(new char[] { ':' }); if (jsons.Length < 2) return rawjson; return jsons[0].Replace("\"", "").Trim(); } protected string _GetValue(string rawjson) { if (string.IsNullOrEmpty(rawjson)) return rawjson; rawjson = rawjson.Trim(); string[] jsons = rawjson.Split(new char[] { ':' }, StringSplitOptions.RemoveEmptyEntries); if (jsons.Length < 2) return rawjson; StringBuilder builder = new StringBuilder(); for (int i = 1; i < jsons.Length; i++) { builder.Append(jsons[i]); builder.Append(":"); } if (builder.Length > 0) builder.Remove(builder.Length - 1, 1); string value = builder.ToString(); if (value.StartsWith("\"")) value = value.Substring(1); if (value.EndsWith("\"")) value = value.Substring(0, value.Length - 1); return value; } protected List<string> _GetCollection(string rawjson) { //[{},{}] List<string> list = new List<string>(); if (string.IsNullOrEmpty(rawjson)) return list; rawjson = rawjson.Trim(); StringBuilder builder = new StringBuilder(); int nestlevel = -1; int mnestlevel = -1; for (int i = 0; i < rawjson.Length; i++) { if (i == 0) continue; else if (i == rawjson.Length - 1) continue; char jsonchar = rawjson[i]; if (jsonchar == '{') { nestlevel++; } if (jsonchar == '}') { nestlevel--; } if (jsonchar == '[') { mnestlevel++; } if (jsonchar == ']') { mnestlevel--; } if (jsonchar == ',' && nestlevel == -1 && mnestlevel == -1) { list.Add(builder.ToString()); builder = new StringBuilder(); } else { builder.Append(jsonchar); } } if (builder.Length > 0) list.Add(builder.ToString()); return list; } } public class CommonJsonModel : CommonJsonModelAnalyzer { private string rawjson; private bool isValue = false; private bool isModel = false; private bool isCollection = false; public CommonJsonModel(string rawjson) { this.rawjson = rawjson; if (string.IsNullOrEmpty(rawjson)) throw new Exception("missing rawjson"); rawjson = rawjson.Trim(); if (rawjson.StartsWith("{")) { isModel = true; } else if (rawjson.StartsWith("[")) { isCollection = true; } else { isValue = true; } } public string Rawjson { get { return rawjson; } } public bool IsValue() { return isValue; } public bool IsValue(string key) { if (!isModel) return false; if (string.IsNullOrEmpty(key)) return false; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); return submodel.IsValue(); } } return false; } public bool IsModel() { return isModel; } public bool IsModel(string key) { if (!isModel) return false; if (string.IsNullOrEmpty(key)) return false; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); return submodel.IsModel(); } } return false; } public bool IsCollection() { return isCollection; } public bool IsCollection(string key) { if (!isModel) return false; if (string.IsNullOrEmpty(key)) return false; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); return submodel.IsCollection(); } } return false; } /// <summary> /// 当模型是对象,返回拥有的key /// </summary> /// <returns></returns> public List<string> GetKeys() { if (!isModel) return null; List<string> list = new List<string>(); foreach (string subjson in base._GetCollection(this.rawjson)) { string key = new CommonJsonModel(subjson).Key; if (!string.IsNullOrEmpty(key)) list.Add(key); } return list; } /// <summary> /// 当模型是对象,key对应是值,则返回key对应的值 /// </summary> /// <param name="key"></param> /// <returns></returns> public string GetValue(string key) { if (!isModel) return null; if (string.IsNullOrEmpty(key)) return null; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) return model.Value; } return null; } /// <summary> /// 模型是对象,key对应是对象,返回key对应的对象 /// </summary> /// <param name="key"></param> /// <returns></returns> public CommonJsonModel GetModel(string key) { if (!isModel) return null; if (string.IsNullOrEmpty(key)) return null; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); if (!submodel.IsModel()) return null; else return submodel; } } return null; } /// <summary> /// 模型是对象,key对应是集合,返回集合 /// </summary> /// <param name="key"></param> /// <returns></returns> public CommonJsonModel GetCollection(string key) { if (!isModel) return null; if (string.IsNullOrEmpty(key)) return null; foreach (string subjson in base._GetCollection(this.rawjson)) { CommonJsonModel model = new CommonJsonModel(subjson); if (!model.IsValue()) continue; if (model.Key == key) { CommonJsonModel submodel = new CommonJsonModel(model.Value); if (!submodel.IsCollection()) return null; else return submodel; } } return null; } /// <summary> /// 模型是集合,返回自身 /// </summary> /// <returns></returns> public List<CommonJsonModel> GetCollection() { List<CommonJsonModel> list = new List<CommonJsonModel>(); if (IsValue()) return list; foreach (string subjson in base._GetCollection(rawjson)) { list.Add(new CommonJsonModel(subjson)); } return list; } /// <summary> /// 当模型是值对象,返回key /// </summary> private string Key { get { if (IsValue()) return base._GetKey(rawjson); return null; } } /// <summary> /// 当模型是值对象,返回value /// </summary> private string Value { get { if (!IsValue()) return null; return base._GetValue(rawjson); } } }
public string Getjsapi_ticket() { string accesstoken = (string)Session["access_tokenzj"]; string urljson = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accesstoken + "&type=jsapi"; string strjson = ""; UTF8Encoding encoding = new UTF8Encoding(); HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(urljson); myRequest.Method = "GET"; myRequest.ContentType = "application/x-www-form-urlencoded"; HttpWebResponse response = myRequest.GetResponse() as HttpWebResponse; Stream responseStream = response.GetResponseStream(); StreamReader reader = new System.IO.StreamReader(responseStream, Encoding.UTF8); string srcString = reader.ReadToEnd(); reader.Close(); if (srcString.Contains("ticket")) { HP.CPS.BLL.WeiXin.CommonJsonModel model = new BLL.WeiXin.CommonJsonModel(srcString); strjson = model.GetValue("ticket"); Session["ticketzj"] = strjson; } return strjson; }
public string Getsignature(string nonceStr, string timespanstr) { if (Session["access_tokenzj"] == null) { Getaccesstoken(); } if (Session["ticketzj"] == null) { Getjsapi_ticket(); } string url = Request.Url.ToString(); string str = "jsapi_ticket=" + (string)Session["ticketzj"] + "&noncestr=" + nonceStr + "×tamp=" + timespanstr + "&url=" + url;// +"&wxref=mp.weixin.qq.com"; string singature = SHA1Util.getSha1(str); string ss = singature; return ss; }
코드 보기
이 문서의 호출 예:
class SHA1Util { public static String getSha1(String str) { //建立SHA1对象 SHA1 sha = new SHA1CryptoServiceProvider(); //将mystr转换成byte[] ASCIIEncoding enc = new ASCIIEncoding(); byte[] dataToHash = enc.GetBytes(str); //Hash运算 byte[] dataHashed = sha.ComputeHash(dataToHash); //将运算结果转换成string string hash = BitConverter.ToString(dataHashed).Replace("-", ""); return hash; } }
3단계: 인터페이스 호출
완료 후 두 번째 단계를 호출하고 나면 세 번째 단계는 매우 쉬워집니다.
class SHA1Util { public static String getSha1(String str) { //建立SHA1对象 SHA1 sha = new SHA1CryptoServiceProvider(); //将mystr转换成byte[] ASCIIEncoding enc = new ASCIIEncoding(); byte[] dataToHash = enc.GetBytes(str); //Hash运算 byte[] dataHashed = sha.ComputeHash(dataToHash); //将运算结果转换成string string hash = BitConverter.ToString(dataHashed).Replace("-", ""); return hash; } }
이 기사의 호출 예는 다음과 같습니다.
<script type="text/javascript"> wx.config({ debug: false, appId: '<%=corpid %>', timestamp: <%=timestamp%>, nonceStr: '<%=nonceStr%>', signature: '<%=signature %>', jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] }); </script>
wx.ready(function(){ // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。});
이 기사는 기본적으로 여기에 요약되어 있습니다.
발생하기 쉬운 문제:
1. 배경 설정 여부 확인: 오른쪽 상단 공개 계정 이름--기능 설정--JS 인터페이스 보안 도메인 이름
2 .코드를 확인하세요. appid가 공식계정 백엔드의 id와 일치하나요?
3. 이미지 호출주소는 절대경로입니다(상대경로는 안되는 것 같습니다).
더 많은 WeChat 개발 노트-호출 사용자 정의 공유 인터페이스 관련 기사를 보려면 PHP 중국어 웹사이트를 주목하세요!

핫 AI 도구

Undress AI Tool
무료로 이미지를 벗다

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

PHP는 웹 개발 및 서버 측 프로그래밍, 특히 WeChat 개발에 널리 사용되는 오픈 소스 스크립팅 언어입니다. 오늘날 점점 더 많은 회사와 개발자가 WeChat 개발에 PHP를 사용하기 시작하고 있습니다. PHP는 배우기 쉽고 사용하기 쉬운 개발 언어이기 때문입니다. WeChat 개발에서 메시지 암호화 및 복호화는 데이터 보안과 관련되어 있기 때문에 매우 중요한 문제입니다. 암호화 및 복호화 방법이 없는 메시지의 경우 해커가 쉽게 데이터를 획득할 수 있어 사용자에게 위협이 될 수 있습니다.

WeChat 공개 계정을 개발할 때 투표 기능이 자주 사용됩니다. 투표 기능은 사용자들이 상호 작용에 빠르게 참여할 수 있는 좋은 방법이며, 이벤트 개최 및 의견 조사를 위한 중요한 도구이기도 합니다. 이 기사에서는 PHP를 사용하여 WeChat 투표 기능을 구현하는 방법을 소개합니다. WeChat 공식 계정 승인을 받으려면 먼저 WeChat 공식 계정 승인을 받아야 합니다. WeChat 공개 플랫폼에서는 WeChat 공개 계정, 공식 계정 및 공개 계정에 해당하는 토큰의 API 주소를 구성해야 합니다. PHP 언어를 사용하여 개발하는 과정에서 WeChat에서 공식적으로 제공하는 PH를 사용해야 합니다.

WeChat의 인기로 인해 점점 더 많은 기업이 WeChat을 마케팅 도구로 사용하기 시작했습니다. WeChat 그룹 메시징 기능은 기업이 WeChat 마케팅을 수행하는 중요한 수단 중 하나입니다. 그러나 수동 전송에만 의존한다면 마케팅 담당자에게는 매우 시간이 많이 걸리고 힘든 작업입니다. 따라서 WeChat 대량 메시징 도구를 개발하는 것이 특히 중요합니다. 이 기사에서는 PHP를 사용하여 WeChat 대량 메시징 도구를 개발하는 방법을 소개합니다. 1. 준비 작업 WeChat 대량 메시징 도구를 개발하려면 다음 기술 사항을 숙지해야 합니다. PHP WeChat 공개 플랫폼 개발에 대한 기본 지식 개발 도구: Sub

WeChat은 현재 세계에서 가장 큰 사용자 기반을 보유한 소셜 플랫폼 중 하나입니다. 모바일 인터넷의 인기로 인해 점점 더 많은 기업들이 WeChat 마케팅의 중요성을 깨닫기 시작했습니다. WeChat 마케팅을 수행할 때 고객 서비스는 중요한 부분입니다. 고객 서비스 채팅 창을 더 잘 관리하기 위해 WeChat 개발에 PHP 언어를 사용할 수 있습니다. 1. PHP 소개 WeChat 개발 PHP는 웹 개발 분야에서 널리 사용되는 오픈 소스 서버 측 스크립팅 언어입니다. WeChat 공개 플랫폼에서 제공하는 개발 인터페이스와 결합하여 PHP 언어를 사용하여 WeChat을 수행할 수 있습니다.

WeChat 공개 계정 개발에서 사용자 태그 관리는 개발자가 사용자를 더 잘 이해하고 관리할 수 있도록 하는 매우 중요한 기능입니다. 이 기사에서는 PHP를 사용하여 WeChat 사용자 태그 관리 기능을 구현하는 방법을 소개합니다. 1. WeChat 사용자의 openid를 획득합니다. WeChat 사용자 태그 관리 기능을 사용하기 전에 먼저 사용자의 openid를 획득해야 합니다. WeChat 공개 계정을 개발할 때 사용자 인증을 통해 openid를 얻는 것이 일반적인 관행입니다. 사용자 인증이 완료되면 다음 코드를 통해 사용자를 얻을 수 있습니다.

WeChat이 사람들의 삶에서 점점 더 중요한 커뮤니케이션 도구가 되면서, WeChat의 민첩한 메시징 기능은 많은 기업과 개인의 선호를 빠르게 받고 있습니다. 기업의 경우 WeChat을 마케팅 플랫폼으로 개발하는 것이 하나의 추세가 되었으며 WeChat 개발의 중요성은 점차 더욱 부각되고 있습니다. 그 중 그룹 전송 기능이 더욱 널리 사용됩니다. 그렇다면 PHP 프로그래머로서 그룹 메시지 전송 기록을 어떻게 구현해야 할까요? 다음은 간략한 소개입니다. 1. WeChat 공개 계정과 관련된 개발 지식을 이해합니다. 그룹 메시지 전송 기록을 구현하는 방법을 이해합니다.

PHP를 사용하여 WeChat 공개 계정을 개발하는 방법 WeChat 공개 계정은 많은 회사의 홍보 및 상호 작용을 위한 중요한 채널이 되었으며, 일반적으로 사용되는 웹 언어인 PHP를 사용하여 WeChat 공개 계정을 개발할 수도 있습니다. 이 기사에서는 PHP를 사용하여 WeChat 공개 계정을 개발하는 구체적인 단계를 소개합니다. 1단계: WeChat 공식 계정의 개발자 계정을 얻습니다. WeChat 공식 계정 개발을 시작하기 전에 WeChat 공식 계정의 개발자 계정을 신청해야 합니다. 구체적인 등록 절차는 WeChat 공개 플랫폼 공식 웹사이트를 참조하세요.

인터넷과 모바일 스마트 기기의 발전으로 WeChat은 소셜 및 마케팅 분야에서 없어서는 안될 부분이 되었습니다. 점점 더 디지털화되는 시대에 WeChat 개발에 PHP를 사용하는 방법은 많은 개발자의 초점이 되었습니다. 이 기사에서는 주로 WeChat 개발에 PHP를 사용하는 방법에 대한 관련 지식 포인트와 일부 팁 및 주의 사항을 소개합니다. 1. 개발 환경 준비 WeChat을 개발하기 전에 먼저 해당 개발 환경을 준비해야 합니다. 특히, PHP 운영 환경과 WeChat 공개 플랫폼을 설치해야 합니다.
