{\"errcode\":40130,\"errmsg\":\"invalid openid list size, at least two openid hint: [3nQPea0245age6]\
上述错误是因为群发的用户数用户有两个或两个以上,由于本公众号只有一个关注用户,所有报错。
可以在获取OPenID时作个判断,只有一个openid时加个空行处理。
///
/// 获取关注者OpenID集合/// public static List GetOpenIDs(string access_token)
{
List result = new List ();
List openidList = GetOpenIDs(access_token, null);
result.AddRange(openidList);
while (openidList.Count > 0)
{
openidList = GetOpenIDs(access_token, openidList[openidList.Count - 1]);
result.AddRange(openidList);
}
/* 若只有一个OpenID,加一空ID,避免“invalid openid list size, at least two openid hint”*/
if (result.Count == 1)
result.Add("");
return result;
}