Name: messenger-batch
Owner: YOCTOL INFO INC.
Description: Gracefully batching messenger requests.
Created: 2018-02-18 14:33:44.0
Updated: 2018-05-08 08:02:41.0
Pushed: 2018-04-28 13:09:56.0
Size: 76
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Gracefully batching messenger requests.
install messenger-batch
t { MessengerClient, MessengerBatch } = require('messaging-api-messenger');
t { MessengerBatchQueue } = require('messenger-batch');
t client = MessengerClient.connect({
cessToken: ACCESS_TOKEN,
t queue = new MessengerBatchQueue(client);
nc () => {
ait queue.push(
MessengerBatch.sendText('psid', 'hello!');
ait queue.push(
MessengerBatch.sendMessage('psid', {
attachment: {
type: 'image',
payload: {
url:
'https://cdn.free.com.tw/blog/wp-content/uploads/2014/08/Placekitten480-g.jpg',
},
},
})
nst profile = await queue.push(MessengerBatch.getUserProfile('psid'));
nsole.log(profile);
;
Retry for error: (#613) Calls to this api have exceeded the rate limit.
.
t { MessengerBatchQueue, isError613 } = require('messenger-batch');
t queue = new MessengerBatchQueue(client, {
ouldRetry: isError613,
tryTimes: 2,
Default: 1000
.
Default: 0
.
Default: () => true
.
MIT © Yoctol