public interface TwitterAdsPreviewApi
| Modifier and Type | Method and Description |
|---|---|
BaseAdsListResponse<TwitterCreativePreview> |
getPublishedTweetPreview(java.lang.String accountId,
java.lang.String tweetId,
TwitterPreviewTarget twitterPreviewTarget)
Sends a GET request to Twitter with the specified parameters and receives the corresponding JSON response for a published tweet.
|
BaseAdsListResponse<TwitterCreativePreview> |
getUnpublishedTweetPreview(java.lang.String accountId,
java.lang.String status,
java.lang.String asUserId,
java.util.List<java.lang.String> mediaIds,
java.lang.String cardId,
TwitterPreviewTarget twitterPreviewTarget,
java.lang.String videoKey)
Sends a GET request to Twitter with the specified parameters and receives the corresponding JSON response for an unpublished tweet.
|
BaseAdsListResponse<TwitterCreativePreview> getUnpublishedTweetPreview(java.lang.String accountId, java.lang.String status, java.lang.String asUserId, java.util.List<java.lang.String> mediaIds, java.lang.String cardId, TwitterPreviewTarget twitterPreviewTarget, java.lang.String videoKey) throws TwitterException
accountId - - The identifier for the leveraged account. Appears within the resources path and is generally a required parameter for all
Advertising API requests excluding GET accounts. The specified account must be associated with the authenticating user.status - - The text of your status update, typically up to 140 characters. URL encode as necessary. t.co link wrapping may affect
character counts.asUserId - - The user ID of the advertiser on behalf of whom you are posting the Tweet. The advertiser must grant your handle (or
handles) access to their ads account via the Twitter UI at ads.twitter.com. This permission allows you to call the API
using the OAuth tokens of your own handle rather than the advertisers.mediaIds - - A list of up to four media ids to associate with the Tweet.cardId - - The ID of the revenue card embedded in the Tweet.twitterPreviewTarget - - The target to render the Tweet preview for. You can preview a Tweet both for how it will look like on Twitter
(TWITTER_TIMELINE) or on the Twitter Audience Platform (PUBLISHER_NETWORK). When using the PUBLISHER_NETWORK
value for the preview_target parameter you should not use a card_id and you must specify media_ids.TwitterException - - Exception class for when TwitterApi calls fail.BaseAdsListResponse<TwitterCreativePreview> getPublishedTweetPreview(java.lang.String accountId, java.lang.String tweetId, TwitterPreviewTarget twitterPreviewTarget) throws TwitterException
accountId - - The identifier for the leveraged account. Appears within the resources path and is generally a required parameter for all
Advertising API requests excluding GET accounts. The specified account must be associated with the authenticating user.tweetId - - The unique identifier referring to a TweettwitterPreviewTarget - - The target to render the Tweet preview for. You can preview a Tweet both for how it will look like on Twitter
(TWITTER_TIMELINE) or on the Twitter Audience Platform (PUBLISHER_NETWORK).TwitterException - - Exception class for when TwitterApi calls fail.