我在 SDK 中没有找到对此的任何引用,但您似乎可以通过以下示例自己调用目标搜索 api :
const bizSdk = require('facebook-nodejs-business-sdk');
const access_token = '<the_token>';
const api = bizSdk.FacebookAdsApi.init(access_token);
const showDebugingInfo = true; // Setting this to true shows more debugging info.
if (showDebugingInfo) {
api.setDebug(true);
}
const params = {
'type' : 'adinterest',
'q' : 'Golf',
'limit' : '10000',
'locale' : 'pt_BR',
};
api.call('GET',['search'], params).then((response) => {
console.log(response)
}).catch(error => {
console.log("something bad happened somewhere", error);
});
此代码将输出如下内容:
{
data: [
{
id: '6003631859287',
name: 'Golf',
audience_size: 218921,
path: [Array],
description: null,
disambiguation_category: 'Negócio local',
topic: 'News and entertainment'
},
{
id: '6003510075864',
name: 'Golfe',
audience_size: 310545288,
path: [Array],
description: '',
topic: 'Sports and outdoors'
....
希望这有帮助