Closed rasikas closed 6 years ago
According to your example, Client should be constructed without proxyData
Client
proxyData
import {Client} from 'fb-messenger-bot-api'; const client = new Client(process.env.PAGE_ACCESS_TOKEN);
However proxyData is not marked as optional so we always have to pass undefined as the second param. (when using the library in a typescript project) https://github.com/crisboarna/fb-messenger-bot-api/blob/master/src/client/Client.ts#L39
undefined
public constructor(token: string, proxyData: ProxyData) { this.requestData = { token }; this.requestData = Utils.getProxyData(this.requestData, proxyData); }
Hey, thank you for pointing it out. I will finish the release today and will publish a new version solving all present issues + suggestions + more.
Made proxyData optional in latest version.
According to your example,
Client
should be constructed withoutproxyData
However
proxyData
is not marked as optional so we always have to passundefined
as the second param. (when using the library in a typescript project) https://github.com/crisboarna/fb-messenger-bot-api/blob/master/src/client/Client.ts#L39