I am trying to test server events of a Facebook pixel using Graph API.
I am getting this response.
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 2804019,
"is_transient": false,
"error_user_title": "Server Side Api Parameter Error",
"error_user_msg": "Unexpected key "email" on param "$['data'][0]".",
"fbtrace_id": "Ajfq0hd3gzSkADpWdh9210O"
}
}
Can anyone help me with what I am doing wrong?
2
Answers
the problem is that you need to send some data in has as suggested in the home page https://developers.facebook.com/docs/marketing-api/conversions-api/payload-helper the customer information must go in has according to quoted by facebook
Customer Information Parameters
Include at least one customer information parameter for each event you want to send. Facebook will use this data for the purposes described in its Business Tools Terms, including ads attribution and ads delivery optimization.
All customer information parameters should be hashed as SHA256, except for client IP address, client user agent, click ID, and browser ID. Any other customer information parameters that are not hashed are automatically rejected by Facebook.
Payload
The
test_event_code
, should be sent as the same token way.Php example: