Giter Club home page Giter Club logo

Comments (13)

XGHeaven avatar XGHeaven commented on September 25, 2024

你是不是写了存储和读取的回调函数,你可能没有处理好这个问题

from wechat-api.

vimer avatar vimer commented on September 25, 2024

@XGHeaven

from wechat-api.

vimer avatar vimer commented on September 25, 2024

@XGHeaven 就是上面这种代码

from wechat-api.

XGHeaven avatar XGHeaven commented on September 25, 2024

我的意思是你是不是在实例化 api 的时候,传入的读取和存储的回调函数出现了一些问题?能上一下代码么?

from wechat-api.

vimer avatar vimer commented on September 25, 2024

@XGHeaven

代码其实挺简单,就是循环openid 推送数据,但是每循环一次 就使用一次 token

from wechat-api.

JacksonTian avatar JacksonTian commented on September 25, 2024

这样子调用肯定会出问题的。

from wechat-api.

vimer avatar vimer commented on September 25, 2024

@JacksonTian 那怎么循环openid进行推送呢

from wechat-api.

JacksonTian avatar JacksonTian commented on September 25, 2024
api.getLatestToken(function () {
  for () {
    api.sendText();
  }
});

你可以在应用启动之前调用下这个函数,预先让token准备好。

from wechat-api.

vimer avatar vimer commented on September 25, 2024

@JacksonTian 我现在就是这样做的 预先获取到token 然后 传给sendText

from wechat-api.

JacksonTian avatar JacksonTian commented on September 25, 2024

不需要你每次都这么做。应用启动的时候做一次就行了。

from wechat-api.

vimer avatar vimer commented on September 25, 2024

恩,另外 现在服务号 给用户进行推送也是需要 交互在 24小时之内吗,很多用户都是没在24小时之内交互的 隔一天的。

from wechat-api.

JacksonTian avatar JacksonTian commented on September 25, 2024

这些规则 仔细看腾讯的文档

from wechat-api.

XGHeaven avatar XGHeaven commented on September 25, 2024

@JacksonTian 我记得可能会发生这样的问题,就是在重新获取token的时候,又发送了一次请求,这次请求一样需要重新获取token,就会获取两次token,而发生覆盖

from wechat-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.