-
Notifications
You must be signed in to change notification settings - Fork 330
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 ServerSideApiConstants class to include new constants for the CTWA_CLID and PAGE_ID parameters. Additionally, there are changes to the ActionSource class to include a new value for business messaging, and changes to the UserData class to include new fields for the CTWA_CLID and PAGE_ID parameters. Files changed: sdk/servers/java/release/src/main/java/com/facebook/ads/sdk/serverside/ActionSource.java sdk/servers/java/release/src/main/java/com/facebook/ads/sdk/serverside/Event.java sdk/servers/java/release/src/main/java/com/facebook/ads/sdk/serverside/MessagingChannel.java sdk/servers/java/release/src/main/java/com/facebook/ads/sdk/serverside/UserData.java codegen/templates/java/src/main/java/com/facebook/ads/utils/ServeSideApiConstants.java sdk/servers/java/release/src/main/java/com/facebook/ads/utils/ServerSideApiConstants.java Other files changes are because of codegen script Reviewed By: stcheng Differential Revision: D53941503 fbshipit-source-id: f54f634050b5f008e5d72f817b27092535315ccf
- Loading branch information
1 parent
3a5d348
commit d811a80
Showing
5 changed files
with
164 additions
and
6 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
41 changes: 41 additions & 0 deletions
41
src/main/java/com/facebook/ads/sdk/serverside/MessagingChannel.java
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,41 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved. | ||
* | ||
* <p>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. | ||
* | ||
* <p>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. | ||
* | ||
* <p>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. | ||
*/ | ||
|
||
package com.facebook.ads.sdk.serverside; | ||
|
||
/** | ||
* Used to specify which messaging channel was used. | ||
* See https://developers.facebook.com/docs/marketing-api/conversions-api/business-messaging | ||
*/ | ||
public enum MessagingChannel { | ||
|
||
/** | ||
* Conversation happened on Instagram Direct. | ||
*/ | ||
instagram, | ||
|
||
/** | ||
* Conversation happened on Messenger. | ||
*/ | ||
messenger, | ||
|
||
/** | ||
* Conversation happened on 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
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