Facebook group posts deletion

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
cheech007
Posts: 1
Joined: Tue Mar 22, 2016 12:54 pm

Facebook group posts deletion

Post by cheech007 » Tue Mar 22, 2016 1:03 pm

Hi, new to imacros, and wondered if anyone has came up with a recent way to delete group posts from facebook this year, 2016.
I have tried using the latest version of imacros and google chrome Version 49.0.2623.87 but with no success.

Can anyone help or is this a lost cause? i have thousands of posts to delete so any help would be appreciated.

Thanks in advance.
IrishMacro
Posts: 135
Joined: Wed Nov 03, 2010 12:27 pm

Re: Facebook group posts deletion

Post by IrishMacro » Sun Mar 27, 2016 8:38 pm

So this doesnt work?

URL GOTO=https://www.facebook.com/<page>/
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=BUTTON FORM=ID:u_1l_1 ATTR=TXT:Delete<SP>Post

alternatively use
TAG POS=1 TYPE=BUTTON FORM=ID:* ATTR=TXT:Delete<SP>Post
Firefox free plugin, last version
Win7
2greedy
Posts: 1
Joined: Fri Apr 08, 2016 9:21 am

Re: Facebook group posts deletion

Post by 2greedy » Fri Apr 08, 2016 9:36 am

I too would like to see this, it is a badly needed macro but you need to be able to tell it how many post's to leave or by date.
hackerboy
Posts: 2
Joined: Tue Apr 04, 2017 10:12 am

Re: Facebook group posts deletion

Post by hackerboy » Tue Apr 04, 2017 10:28 am

I've shared this to other threads as well.

Here is a detailed step by step instruction you can find on GitHub:
https://github.com/cefjoeii/delete-fb-group-posts

It works for me. It will work for you.
mienoyes
Posts: 4
Joined: Wed Apr 05, 2017 9:05 am

Re: Facebook group posts deletion

Post by mienoyes » Wed Apr 05, 2017 7:13 pm

Some of my groups have tens of thousands of members. They were hot girl groups but after some heat from Facebook and closing one despite me moderating quite heavily then I will delete all the posts and change the subject while keeping the members.

So I first started with the script I found on Reddit which I successfully ran once and it cleaned up a large group quite well. I sat back and it did it's thing, quite fast with not need for me to help. The strange thing is I was never able to run that script successfully again despite cleaning my temp files etc, changing browsers, rebooting pc, cleaning DNS cache changing admins, trying various groups, i away got an error on the 3rd line. The good thing about this was it started from the earliest posts so the group could still function as normal while it ran. This is that script:

Code: Select all

URL GOTO=https://www.facebook.com/groups/GROUPNAME
TAG POS=1 TYPE=A ATTR=ID:u_0_2*
WAIT SECONDS=1
TAG POS=1 TYPE=DIV ATTR=TXT:Delete<SP>Post
WAIT SECONDS=1
TAG POS=1 TYPE=BUTTON ATTR=TXT:Delete
WAIT SECONDS=1
So after not getting anywhere with that I ran the one that hackerboy posted above and this has worked for me. I did not try the one posted by IrishMacro yet.

But there are a couple of things I would like to improve:

# How to start the posts deleting from the oldest posts instead of what seems to be it starting from the latest posts?
# It also pauses when it gets to posts posted by other Admins, how to override that or miss those posts?

Could I combine parts from the script posted on Reddit with hackerboy's script?
mienoyes
Posts: 4
Joined: Wed Apr 05, 2017 9:05 am

Re: Facebook group posts deletion

Post by mienoyes » Wed Apr 05, 2017 7:25 pm

Also, the script posted by hackerboy seems to also have an issue with posts where "An admin turned off commenting for this post"
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Facebook group posts deletion

Post by chivracq » Wed Apr 05, 2017 10:48 pm

Hum, I usually don't help Users using/misusing iMacros for Social Media Scripting as it is usually for Like/Follow/Post which I most of the time consider as Spam, but hum again..., I could make an Exception for Page/Group Admins who want to delete Posts and administer their Members, but I will only do so once sbd will one day post a bit correctly on the Forum, which is not the case for any of the Users who's posted in this current Thread as nobody mentioned their Environment (FCI) as this is a Required Condition for me to answer Threads, @IrishMacro and @hackerboy slightly excused even if they as well should have mentioned in which FCI they tested their Script...

@mienoyes you sound a bit motivated, but hum, posting twice more or less the same Msg instead of editing your first Post is not "optimal" Use of the Forum either as one of your 2 Posts will need to be deleted as Duplicate, which you cannot do anymore yourself as sbd (=I) will have posted after you, maybe an Explanation(?) as well why you want/need to delete Posts on your FB-Group, if your Users do the same, tja!, ah-ah...! :idea:

My "Conditions", ah-ah...!:
1- FCI mentioned clearly (+ in your previous Thread as well)...

2- A complete=COMPLETE...!! List of Requirements!!!
(I don't want extra-Requirements coming after each working Script like for example in this Thread, I want the "complete Picture" from the beginning for me to come up with the best Solution straightaway instead of having to find Workaround on Workaround...)
I guess I would be able to make them all configurable with some easy Switch [ON/OFF/Default] like for "Admin Posts" + "Commenting turned Off by Admin" + "Start from Newest/Oldest" + etc for example, plus even make them configurable at some "higher" Level for the Script to (hopefully) keep working in the Future as FB-Pages usually tend to "change" every 3 months on Average, due to some HTML-Revamp or New Functionality added... Some can be foreseen and a Script can be made configurable/adaptive enough to (easily) adapt to such Changes...

3- I write Scripts in pure '.iim' (+ Looping very probably in this Case), I don't do '.js' Scripts, and '.iim' Scripts anyway can run on all Browsers supported by iMacros while '.js' Scripts only run on FF, and I try to avoid Commands not supported by all 3-4 Browsers, I sometimes use the 'EVENT' Mode but it is now since recently supported by all 4 Browsers...
But anyway, if you later want to add some extra Conditional Logic, you can always easily convert an '.iim' Script to a '.js' Script or call it from a '.js' Script, so that shouldn't be a Pb, I would think, on the contrary...

4- And, ah-ah...!, I would need to be made Co-Admin of such a Page/Group on FB to do all my Testing, with clear Instructions/Examples about which Posts/Users can be approved/deleted/etc... (I am already Admin of one "personal" Group but with mini-Volume for Posts and I won't go experimenting on it, + (still) Co-Admin on a few other FB-Groups with large Volume from some previous Threads on the Forum from a few months ago I think, but again I won't go "experimenting" on those Groups, ah-ah...!)

I am not sure btw if starting to delete Posts from the Oldest is a "good" Idea, I think FB-Pages require first to scroll down every 10-12-15 Posts to retrieve and make the next 10-12-15 Posts appear in order for iMacros to be able to "handle" them and any Refresh of the Page would force a "start-all-over-again-from-the-beginning", even if there might be some "Solution", I saw once a Page with some "Advanced" Query Functionality and 'Sort-on-Posting-Date' was maybe a Possibility...
My "own" FB-Group has very low Volume, so I never really investigated in that Direction as I never needed the Functionality for myself..., and logically enough, most of my Knowledge and "twisted/creative Use" of iMacros comes from when I need to write stg for myself, ah-ah..! :twisted:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
mienoyes
Posts: 4
Joined: Wed Apr 05, 2017 9:05 am

Re: Facebook group posts deletion

Post by mienoyes » Thu Apr 06, 2017 12:14 am

hi chivracq, this makes sense about starting from the most recent posts. I guess having the script to leave the latest 5 posts or something would be good if possible or even better to allow more if it does not slow the script down too much.

I have realized that the reason why the script was pausing was most likely as the admin was not the original group creator. I tried on a group with no original group creator and it has been running for sometime without an issue yet.

I use image blocking addons to my browser to save on bandwidth loading all the images when running the script.

It still seems to be stopping on posts where comments were turned off.

I will contact you to more about this later, thanks a lot.

as for my posts, I posted my messages twice as I had images turned off in my browser and I could not see the edit button. (little bug made me see icon as on) duh!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Facebook group posts deletion

Post by chivracq » Thu Apr 06, 2017 3:21 am

mienoyes wrote:hi chivracq, this makes sense about starting from the most recent posts. I guess having the script to leave the latest 5 posts or something would be good if possible or even better to allow more if it does not slow the script down too much.

I have realized that the reason why the script was pausing was most likely as the admin was not the original group creator. I tried on a group with no original group creator and it has been running for sometime without an issue yet.

I use image blocking addons to my browser to save on bandwidth loading all the images when running the script.

It still seems to be stopping on posts where comments were turned off.

I will contact you to more about this later, thanks a lot.

as for my posts, I posted my messages twice as I had images turned off in my browser and I could not see the edit button. (little bug made me see icon as on) duh!
OK, Duplicate Post will be deleted "one day" by the Forum Admin (who doesn't come very often to the Forum)...

"CIM" again for the rest for me to follow up... :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
hackerboy
Posts: 2
Joined: Tue Apr 04, 2017 10:12 am

Re: Facebook group posts deletion

Post by hackerboy » Wed May 03, 2017 12:23 pm

mienoyes wrote:Also, the script posted by hackerboy seems to also have an issue with posts where "An admin turned off commenting for this post"
My guess is because the

Code: Select all

TAG POS=1 TYPE=A ATTR=TXT:*Comment*
is looking for anything that has a 'comment' word.
Post Reply