unfollowOA
Bắt đầu hỗ trợ ở phiên bản:
- SDK: 2.5.3
Lưu ý
Cần xin cấp quyền tại trang Quản lý ứng dụng
Cho phép ứng dụng hiển thị giao diện yêu cầu bỏ theo dõi Official Account để người dùng xác nhận.
Parameters
Object object
| Property | Type | Default | Required | Description | Minimum Version |
|---|---|---|---|---|---|
| id | string | true | Id của Official Account | ||
| success | function | Callback function khi gọi api thành công | |||
| fail | function | Callback function khi gọi api thất bại |
Sample Code
import { unfollowOA } from "zmp-sdk/apis";
unfollowOA({
id: "xxxx",
success: (res) => {},
fail: (err) => {}
});
Hoặc
import { unfollowOA } from "zmp-sdk/apis";
const unfollow = async () => {
try {
const res = await unfollowOA({
id: "xxxx"
});
} catch (error) {
// xử lý khi gọi api thất bại
console.log(error);
}
};
Errors
| Code | Message | Note |
|---|---|---|
| -201 | User deny process action! | Người dùng từ chối |