-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support to WhatsApp events on Business SDK
Summary: CAPI CTWA has been launched to 100% since November 2023, but is still not supported in our Meta Business SDK. This diff adds support for WhatsApp events on the Business SDK. It includes changes to the Event class to add a new field for the messaging channel, as well as changes to the User Data class to include new constants for the CTWA_CLID and PAGE_ID parameters. Reviewed By: stcheng Differential Revision: D54592282 fbshipit-source-id: 95e2e43718ab45e9a51bc3a89d8ee38239da7ff9
- Loading branch information
1 parent
e43a205
commit 2c7166d
Showing
4 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
facebook_business/adobjects/serverside/messaging_channel.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2014 Facebook, Inc. | ||
|
||
# You are hereby granted a non-exclusive, worldwide, royalty-free license to | ||
# use, copy, modify, and distribute this software in source code or binary | ||
# form for use in connection with the web services and APIs provided by | ||
# Facebook. | ||
|
||
# As with any software that integrates with the Facebook platform, your use | ||
# of this software is subject to the Facebook Developer Principles and | ||
# Policies [http://developers.facebook.com/policy/]. This copyright notice | ||
# shall be included in all copies or substantial portions of the software. | ||
|
||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
# DEALINGS IN THE SOFTWARE. | ||
|
||
from enum import Enum | ||
|
||
|
||
# Used to specify which messaging channel was used. | ||
# See https://developers.facebook.com/docs/marketing-api/conversions-api/business-messaging | ||
|
||
class MessagingChannel(Enum): | ||
|
||
""" | ||
Conversion happened on WhatsApp. | ||
""" | ||
WHATSAPP = 'whatsapp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters