Nhảy tới nội dung

followOA

Bắt đầu hỗ trợ ở phiên bản:

  • API: 2.5.3
Lưu ý

Cần xin cấp quyền tại trang Quản lý ứng dụng

Theo dõi Official Account.

Parameters

Object object

PropertyTypeDefaultRequiredDescriptionMinimum Version
idstringtrueId của Official Account
successfunctionCallback function khi gọi api thành công
failfunctionCallback function khi gọi api thất bại

Sample Code

import api from 'zmp-sdk';

api.login({
success: () => {
api.followOA({
id: 'xxxx',
success: (res) => {},
fail: (err) => {}
});
},
fail: (err) => {}
});

// hoặc
const test = async () => {
try {
await api.login();
await api.followOA({
id: 'xxxx'
});
} catch (error) {
// xử lý khi gọi api thất bại
console.log(error);
}
};