Skip to content

Replace hardcoded additional_owners param with ACCOUNT_ID setup var #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/media_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# https://developer.twitter.com/en/docs/ads/creatives/guides/media-library
resource = '/1.1/media/upload.json'
params = {
'additional_owners': '756201191646691328',
'additional_owners': ACCOUNT_ID,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch that this was hardcoded. This field represent the user ID of another user that should have access to use this asset. So this field is only necessary when the credentials that are uploading the asset are different from a user to an ads account that will use the asset. In this example, it isn't clear how to provide an additional_owners value that would make sense.

It might be best to comment out this parameter but add a note that this should be set for another user ID.

'media_category': MEDIA_CATEGORY.TWEET_IMAGE
}
domain = 'https://upload.twitter.com'
Expand Down