Rinstapkg (version 0.1.0)

ig_comment_delete_bulk: Delete Comments on a Post in Bulk

Description

This function takes the media_id of a post as well as one or more comment_ids and then deletes all of those comments

Usage

ig_comment_delete_bulk(media_id, comment_id, verbose = FALSE)

Arguments

media_id

numeric; the unique id to identify a post which can be found in the id, not the pk field, of posts returned via many of the functions retrieving feeds.

comment_id

numeric; the unique id to identify a post which can be found in the "id" on other comments returned via the Instagram API

verbose

logical; do you want informative messages?

Examples

Run this code
# NOT RUN {
last_post_media_id <- ig_my_timeline(paginate = FALSE)$id[1]
comment_result1 <- ig_comment(last_post_media_id, 
                             comment_text = "New Comment #1")
comment1_media_id <- comment_result1$comment$media_id 
comment_result2 <- ig_comment(last_post_media_id, 
                             comment_text = "New Comment #2")
comment2_media_id <- comment_result2$comment$media_id                               
deletion_result <- ig_comment_delete(last_post_media_id, 
                                     c(comment1_media_id, 
                                       comment2_media_id))
# }

Run the code above in your browser using DataCamp Workspace