2017-12-27 4 views
0

다양한 페이지와 계정 관련 게시물에 대한 통찰력, cpm 등의 Facebook 마케팅 데이터를 표시해야하는 앱을 만들고 있습니다. 나는 지금까지 그것을 이해할 수 없었다. 앱을 만들었으며 샌드 박스 계정에서 적절한 액세스 토큰으로 전화를 걸려고했습니다. 데모 코드를 실행하여 광고 계정의 이름과 나이를 읽을 때 다음 오류가 발생합니다. 이것은 정말 실망스럽고 고용주는 화를 내고 있습니다. 어떤 도움을 주셔서 감사합니다.마케팅 API를 사용하여 Facebook Analytics 데이터에 액세스하는 방법은 무엇입니까?

코드 (Node.js를)

const adsSdk = require('facebook-nodejs-ads-sdk'); 
const accessToken = 'Sandbox acct token'; 
const api = adsSdk.FacebookAdsApi.init(accessToken); 

const AdAccount = adsSdk.AdAccount; 
const account = new AdAccount(XX Sandbox ID XX); 
console.log(account.id) 

account 
    .read([AdAccount.Fields.name, AdAccount.Fields.age]) 
    .then((account) => { 
    logPassedTest(test1 + ':Pass', account); 
    }) 
    .catch((error) => { 
    console.log(error); 
    }); 

에러 :

message: 'Unsupported get request. Object with ID \'XXX\' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api', 

    { error: 
     { message: 'Unsupported get request. Object with ID \'XXX\' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api', 
     type: 'GraphMethodException', 
     code: 100, 
     error_subcode: 33, 
     fbtrace_id: 'ACp+q8Bas3Z' } }, 
    method: 'GET', 
    url: 'https://graph.facebook.com/v2.11/X?fields=name%2Cage&access_token=XX', 
    data: {} } 

답변

0

AdAccount의 ID가 act_

act_<ACCOUNT_ID> 접두어.

+0

'act_'접두어가 붙어 있어도 여전히 동일한 오류 코드/결과가 표시됩니다. –

-1

실제로 디버깅 할 방법이 없습니다. 오류 코드는 사용자가 만들고있는 통화에 잘못된 개체를 제공하고 있음을 의미합니다.

로 이동 https://developers.facebook.com/tools/explorer/

토큰 액세스 연결하고 당신이 만들고있는 정확한 전화. 호출이 실패하면 성공할 때까지 조각을 제거하십시오.

관련 문제