python-sage-meta

Contents:

  • Getting Started
  • Code API
  • Examples
    • Fetching User Data
    • Method: get_accounts
    • Fetching Instagram Media
    • Method: get_instagram_comments
    • Fetching Instagram Stories
    • Fetching Post Mentions
    • Fetching Comment Mentions
    • Replying to a Comment Mention
    • Searching for a Hashtag
    • Fetching Hashtag Information
    • Fetching Recent Media for a Hashtag
    • Fetching Top Media for a Hashtag
    • Publishing a Photo to Instagram
    • Publishing a Video to Instagram
    • Publishing a Carousel to Instagram
    • Fetching Instagram Account Insights
    • Managing Copyright Information
    • Fetching Account Settings
    • Posting a Comment
    • Replying to a Comment
    • Publishing a Story
    • Data Classes Examples
python-sage-meta
  • Examples
  • Managing Copyright Information
  • View page source

Managing Copyright Information

The CopyrightManager class manages copyright information via the Facebook Graph API.

Initialization:

from sage_meta.services.copyright import CopyrightManager

ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"
copyright_manager = CopyrightManager(access_token=ACCESS_TOKEN)

Checking Copyright Status of Unpublished Videos:

try:
    container_id = "YOUR_CONTAINER_ID"
    status = copyright_manager.check_copyright_status_unpublished(container_id=container_id)
    print(status)
except Exception as e:
    logging.critical("An error occurred: %s", e)

Checking Copyright Status of Published Videos:

try:
    media_id = "YOUR_MEDIA_ID"
    status = copyright_manager.check_copyright_status_published(media_id=media_id)
    print(status)
except Exception as e:
    logging.critical("An error occurred: %s", e)

Explanation: - The CopyrightManager class manages copyright information via the Facebook Graph API. - The check_copyright_status_unpublished method checks the copyright status of an uploaded but not yet published video using the given container ID. - The check_copyright_status_published method checks the copyright status of a published video using the given media ID. - If the operation fails, it raises an appropriate error.

Previous Next

© Copyright 2024, sageteam.org info@sageteam.org.

Built with Sphinx using a theme provided by Read the Docs.