messaging-api-messenger
- [new] add
options.fields
to getUserProfile
:
client
.getUserProfile(USER_ID, {
fields: [
`id`,
`name`,
`first_name`,
`last_name`,
`profile_pic`,
`locale`,
`timezone`,
`gender`,
],
})
.then(user => {
console.log(user);
// {
// id: '5566'
// first_name: 'Johnathan',
// last_name: 'Jackson',
// profile_pic: 'https://example.com/pic.png',
// locale: 'en_US',
// timezone: 8,
// gender: 'male',
// }
});
- [new] implement
client.getSubscriptions
:
client.getSubscriptions({
access_token: APP_ACCESS_TOKEN,
});
// or
client.getSubscriptions({
access_token: `${APP_ID}|${APP_SECRET}`,
});
- [new] implement
client.getPageSubscription
:
client.getPageSubscription({
access_token: APP_ACCESS_TOKEN,
});
// or
client.getPageSubscription({
access_token: `${APP_ID}|${APP_SECRET}`,
});