我正在开发 Ruby on Rails 应用程序并集成 Meta 的 Conversation API。这是我到目前为止所做的:
POST "https://graph.facebook.com/v21.0/#{PIXEL_ID}/events"
这是我的身体
body = {
data: [
{
event_name: "Purchase",
event_time: DateTime.current.to_i,
action_source: "other",
original_event_data: {
event_name: "Purchase",
event_time: DateTime.current.to_i
},
user_data: {
external_id: "12345"
},
value: 100.00,
custom_data: {
currency: "USD",
order_id: "67890",
price: 100.00,
revenue: 90.00,
item_id: "11111",
item_name: "Title",
purchase_type: "purchase_type",
platform: "Web",
discount: 10.00,
quantity: 1
}
}
].to_json,
access_token: "access_token"
}
经过几次尝试,我确定我的活动不会到来,因为
action_source
是 other
。我将其更改为 web
,它开始接收事件。