I will explain the scenarios here

1) When user click on link facebook button facebook permission dialog is bypassed and returns back directly on redirect uri(http://localhost:3000/ in my case) with code and state.

2) I am successfully able to exchange the code return above with access token.

3) I used facebooks access token debugger to analyze the token above and shows be proper scopes i need.

enter image description here

4) After this i fetch ad_accounts id, page token and page ids using this token. 5) when i use this token to create campaign for ads i get the following error.

FacebookAds::ClientError (Invalid parameter: Terms of Service Not Accepted (fbtrace_id: Ch/RdwGB+D3))

I use ruby facebook-business-sdk.

My app is in development mode and not live yet.

I can see both facebook login and marketing api green live in my app dashboard. enter image description here

It makes sense to me that i am getting "Terms not accepted error" as user is never prompted to permissions dialog to permit my app for token.

I also observed that if add scope params to facebook login uri, the user is prompted to permission dialog.

I must be missing some configuration here, i have not yet submitted my app for review.

Any help/clue is appreciated.

0

There are 0 best solutions below