Getting facebook ads api error in .net

614 Views Asked by At

I'm using Facebook ads api for .net and when I catch an error, the message is always the same general error:

(FacebookApiException - #100) Invalid parameter

It happens since I moved to the versioned calls (v2.2) - before that I used the unversioned calls and it was fine.

For example, this is how I get the error (using regular try catch in c#)

try
{
    var result = facebookClient.Post("v2.2/act_" + accountId + "/adgroups", parameters) as IDictionary<string, object>;
}
catch (Exception ex)
{
    throw ex; // The error should be in ex.Message
}

Is there a way to extract the real error message from the exception?

1

There are 1 best solutions below

2
On BEST ANSWER

Thanks everyone for your help. I dived into this issue and it's not a Facebook problem. The problem is in the third party SDK.

I contacted the development team, they aware of this issue and started fixing it.