Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

question from:https://stackoverflow.com/questions/66054366/fabebook-pixel-test-server-events

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
416 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

    {
      "data": [
        {
          "event_name": "uno",
          "event_time": 1613600385,
          "event_source_url": "jksdhfkjsdhfkdjs",
          "action_source": "website",
          "user_data": {
            "em": "7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068",
            "ph": "7474b932bd08487ffc76773fdfd45ce84f3cbfccf2c8c2dcb7446836826c06cf"
          },
          "custom_data": {
            "currency": "USD",
            "value": "142.52"
          }
        }
      ],
      "test_event_code": "TEST99348"
    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...