Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
856 views
in Technique[技术] by (71.8m points)

facebook graph api - Fabebook pixel test server events

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

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

1 Reply

0 votes
by (71.8m points)

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"
    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...