import facebook

# Set your Facebook access token
access_token = 'your_access_token_here'

# Create a Facebook Graph API object
graph = facebook.GraphAPI(access_token)

# Post ID of the content where you want to interact with comments
post_id = 'your_post_id_here'

# Fetch comments from the post
comments = graph.get_connections(post_id, 'comments')

# Your promotional message
promo_message = "🚀 Check out our professional content writing services! Visit: https://yourwebsite.com/content-services"

# Reply to each comment with the promotional message
for comment in comments['data']:
    commenter_id = comment['from']['id']
    graph.put_object(parent_object=commenter_id, connection_name='feed', message=promo_message)

print("Promotional replies added to comments!")

Post a Comment

0 Comments