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.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Facebook group posts deletion

by cheech007 on Tue Mar 22, 2016 6:03 am

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.
cheech007
 
Posts: 1
Joined: Tue Mar 22, 2016 5:54 am

Re: Facebook group posts deletion

by IrishMacro on Sun Mar 27, 2016 1: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
IrishMacro
 
Posts: 135
Joined: Wed Nov 03, 2010 5:27 am

Re: Facebook group posts deletion

by 2greedy on Fri Apr 08, 2016 2: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.
2greedy
 
Posts: 1
Joined: Fri Apr 08, 2016 2:21 am

Re: Facebook group posts deletion

by hackerboy on Tue Apr 04, 2017 3: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.
hackerboy
 
Posts: 2
Joined: Tue Apr 04, 2017 3:12 am

Re: Facebook group posts deletion

by mienoyes on Wed Apr 05, 2017 12: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: 5
Joined: Wed Apr 05, 2017 2:05 am

Re: Facebook group posts deletion

by mienoyes on Wed Apr 05, 2017 12:25 pm

Deleted duplicate
Last edited by mienoyes on Wed Apr 05, 2017 4:46 pm, edited 1 time in total.
mienoyes
 
Posts: 5
Joined: Wed Apr 05, 2017 2:05 am

Re: Facebook group posts deletion

by mienoyes on Wed Apr 05, 2017 12: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"
mienoyes
 
Posts: 5
Joined: Wed Apr 05, 2017 2:05 am

Re: Facebook group posts deletion

by chivracq on Wed Apr 05, 2017 3: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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Facebook group posts deletion

by mienoyes on Wed Apr 05, 2017 5:14 pm

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!
mienoyes
 
Posts: 5
Joined: Wed Apr 05, 2017 2:05 am

Re: Facebook group posts deletion

by chivracq on Wed Apr 05, 2017 8:21 pm

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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Facebook group posts deletion

by hackerboy on Wed May 03, 2017 5:23 am

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.
hackerboy
 
Posts: 2
Joined: Tue Apr 04, 2017 3:12 am


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 11 guests

-->