Unable to Pause PromotedTweet with Python API

python

#1

From a line_item, I got the PromotedTweet with the following code:
tweet_list = list(PromotedTweet.all(account, line_item_ids=line_item.id))
tweet = tweet_list[0]
tweet.paused = True
tweet.save()

But, the tweet’s status was not updated when viewed with the Ads Manager. Could you please explain why this is?

Thanks.


#2

@LeoAdgo: Thanks for the question. Please note that paused is not a writable field for promoted_tweets entities. See PUT accounts/:account_id/promoted_tweets/:id for more information.


#3

Thanks for the quick response. What would be the proper way to pause a PromotedTweet within a LineItem then?


#4

BTW, just went to the SOURCE, and find https://github.com/twitterdev/twitter-python-ads-sdk/blob/master/twitter_ads/creative.py:

resource_property(PromotedTweet, ‘paused’, transform=TRANSFORM.BOOL)

Which doesn’t seem to indicate the field as readonly, like:

resource_property(PromotedTweet, ‘deleted’, readonly=True, transform=TRANSFORM.BOOL)


#5

There isn’t a way to do this.

Thanks for flagging the SDK issue—this is incorrect and will be fixed.


#6

We are able to pause promoted tweets from ADS UI, so looks like functionality is in place, but API (not talking about python SDK but API itself) does not allow use it.
Are there any plans to make ‘paused’ field writable and represent current promoted tweet’s state?


#7

Thanks for the question, @RevJetBridge. If we decide to make a change to the existing behavior, we’ll be sure to announce it here.


#8

@LeoAdgo and @RevJetBridge: What you can do is delete the promoted_tweets entity when you want it paused and recreate it when you want it unpaused.