Need Help Creating Post Deletion for Facebook Group (mobile)

Discussions and Tech Support related to the iMacros Google Chrome extension.
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.
Post Reply
detom
Posts: 5
Joined: Thu Jan 17, 2019 7:53 am

Need Help Creating Post Deletion for Facebook Group (mobile)

Post by detom » Thu Jan 17, 2019 8:15 am

Hello, ladies n gentlemen,
I'm a newbie who just found imacro and i need help from someone who know how to make simple loop imacro to delete all facebook group posts (as admin) in the m.facebook.com/group/ (mobile facebook version) using chrome webbrowser and imacro on my laptop.

I have tried the codes found here https://github.com/cefjoeii/delete-fb-group-posts and the mbasic works well, but after 2 months erased posts the remaining group posts are not showing up while browsing either on mbasic.facebook.com/groups/ nor (web)www.facebook.com/groups. They do however show up in the facebook app on android, which doesn't do much for me.

Interestingly the remaning posts show up while browsing m.facebook.com/groups/ thus they can still be deleted with imacro looping but the coding i assume have to be slightly modified. I like the simplicity of the mbasic code loop for group post deletions, the www.facebook version from the link above did not work for me. Now the difference as i grasp it is that the (mobile) m.facebook.com/groups version need selection code to open the 3-dot dropdown menu to the upper right in each post. When it is opened the code need to choose 'Delete Post', confirm the pop-up 'Delete'. As the page reloads after deletion the process loops again. Thus is the loop about 4 steps similar to the mbasic code. I have googled and search the forum for a code specifically that can open that 3-dot dropdown menu in the upper right corner of each post but i have not found any good leads.

So, what i need is the service of someone who can help with a code that will enable me to delete all posts from the facebook group i'm administering, specifically using the m.facebook.com constellation, as that is the only browsing address that still shows old posts. So, it needs to open the group, select the 3-dot dropdown menu, select Delete Post, Confirm Delete and keep looping that. I used the 100 intervall max since my imacro version is still trial. Any help is much appreciated. I'm cleaning up this group which has been a battlefield of broken hearts for 4 years. The other admin left it to me to clean it up.
Attachments
PH.jpg
chivracq
Posts: 8052
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by chivracq » Thu Jan 17, 2019 11:42 am

detom wrote:
Thu Jan 17, 2019 8:15 am
Hello, ladies n gentlemen,
I'm a newbie who just found imacro and i need help from someone who know how to make simple loop imacro to delete all facebook group posts (as admin) in the m.facebook.com/group/ (mobile facebook version) using chrome webbrowser and imacro on my laptop.

I have tried the codes found here https://github.com/cefjoeii/delete-fb-group-posts and the mbasic works well, but after 2 months erased posts the remaining group posts are not showing up while browsing either on mbasic.facebook.com/groups/ nor (web)www.facebook.com/groups. They do however show up in the facebook app on android, which doesn't do much for me.

Interestingly the remaning posts show up while browsing m.facebook.com/groups/ thus they can still be deleted with imacro looping but the coding i assume have to be slightly modified. I like the simplicity of the mbasic code loop for group post deletions, the www.facebook version from the link above did not work for me. Now the difference as i grasp it is that the (mobile) m.facebook.com/groups version need selection code to open the 3-dot dropdown menu to the upper right in each post. When it is opened the code need to choose 'Delete Post', confirm the pop-up 'Delete'. As the page reloads after deletion the process loops again. Thus is the loop about 4 steps similar to the mbasic code. I have googled and search the forum for a code specifically that can open that 3-dot dropdown menu in the upper right corner of each post but i have not found any good leads.

So, what i need is the service of someone who can help with a code that will enable me to delete all posts from the facebook group i'm administering, specifically using the m.facebook.com constellation, as that is the only browsing address that still shows old posts. So, it needs to open the group, select the 3-dot dropdown menu, select Delete Post, Confirm Delete and keep looping that. I used the 100 intervall max since my imacro version is still trial. Any help is much appreciated. I'm cleaning up this group which has been a battlefield of broken hearts for 4 years. The other admin left it to me to clean it up.
Hum, good Quality in your Post to explain the "Context" and "Situation", but wrong Sub-Forum, your Case has nothing specific to iMacros for CR I would think... (No need to duplicate now...) + FCI not mentioned (read my Sig...) + "Need Help", Okay..., but no Script posted, => what is your Problem with iMacros...?, where do you get stuck...?, what have you tried...?

I don't think anybody will be writing your Script, or it could take a "while", and if you are "lucky"... :wink:
=> Simply record your Actions and loop your Script, that shouldn't be very difficult, I would think... :idea:
- (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...
detom
Posts: 5
Joined: Thu Jan 17, 2019 7:53 am

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by detom » Thu Jan 17, 2019 12:27 pm

Hi Chivracq n thx for the reply,
Sorry for posting in the wrong sub-forum. I'm a newbie so there are many things i'm unaware of, even the FCI which is.. umm.. i just downloaded chrome on my laptop with a win 8 op, Imacros latest from their web.

I ran this for 2 days which worked great until facebook for some reason hides the posts on the mbasic.facebook.com/groups/ page.. so there is no link 'see more posts' etc to work on. This is the script:

SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES

WAIT SECONDS=3

TAG POS=1 TYPE=SPAN ATTR=TXT:See<SP>More<SP>Posts
WAIT SECONDS=3

TAG POS=1 TYPE=A ATTR=TXT:*Comment*
WAIT SECONDS=3

TAG POS=1 TYPE=A ATTR=TXT:Delete
WAIT SECONDS=3

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/a/delete.php?* ATTR=*
WAIT SECONDS=4


So, instead i've found that the m.facebook.com/groups page still shows old posts and they can be deleted via the dropdown menu (3 dots) to the upper right in each post. I've recorded my actions for 4 consequtive post deletions the the code looks like this:

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://m.facebook.com/groups/Paguyuban.Hindu
TAG POS=16 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=1 TYPE=A ATTR=TXT:Delete
TAG POS=17 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=2 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete
TAG POS=28 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=3 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete
TAG POS=29 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=4 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete

I do not have the know-how to automate this as just looping a deletion recording won't work. Perhaps due to the different post numbers etc. I'm a newbie to i'm kinda grabbing in the dark here and guessing that there need to be a slight coding to make this work. Not sure how complicated it would be nor if it is problematic with dropdown menus. I'd be happy to give a little paypal donation for anyone who can contribute with a working code that i can loop to delete posts from this group using the m.facebook.com/group/ setting. Sorry for my untechnical language. This in not at all my expertize and this is why i'm asking for your guidance. Thanks again.
chivracq
Posts: 8052
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by chivracq » Thu Jan 17, 2019 1:41 pm

detom wrote:
Thu Jan 17, 2019 12:27 pm
Hi Chivracq n thx for the reply,
Sorry for posting in the wrong sub-forum. I'm a newbie so there are many things i'm unaware of, even the FCI which is.. umm.. i just downloaded chrome on my laptop with a win 8 op, Imacros latest from their web.

I ran this for 2 days which worked great until facebook for some reason hides the posts on the mbasic.facebook.com/groups/ page.. so there is no link 'see more posts' etc to work on. This is the script:

Code: Select all

SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES

WAIT SECONDS=3

TAG POS=1 TYPE=SPAN ATTR=TXT:See<SP>More<SP>Posts
WAIT SECONDS=3

TAG POS=1 TYPE=A ATTR=TXT:*Comment*
WAIT SECONDS=3

TAG POS=1 TYPE=A ATTR=TXT:Delete
WAIT SECONDS=3

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/a/delete.php?* ATTR=*
WAIT SECONDS=4

So, instead i've found that the m.facebook.com/groups page still shows old posts and they can be deleted via the dropdown menu (3 dots) to the upper right in each post. I've recorded my actions for 4 consequtive post deletions the the code looks like this:

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://m.facebook.com/groups/Paguyuban.Hindu
TAG POS=16 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=1 TYPE=A ATTR=TXT:Delete
TAG POS=17 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=2 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete
TAG POS=28 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=3 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete
TAG POS=29 TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=4 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete
I do not have the know-how to automate this as just looping a deletion recording won't work. Perhaps due to the different post numbers etc. I'm a newbie to i'm kinda grabbing in the dark here and guessing that there need to be a slight coding to make this work. Not sure how complicated it would be nor if it is problematic with dropdown menus. I'd be happy to give a little paypal donation for anyone who can contribute with a working code that i can loop to delete posts from this group using the m.facebook.com/group/ setting. Sorry for my untechnical language. This in not at all my expertize and this is why i'm asking for your guidance. Thanks again.
OK, so your FCI will (probably) be:
iMacros for CR v10.0.5 'Free', CR71, Win8.

OK, then I guess every Click on the 'HREF' will be for the 3 Dots, I'm a bit surprised by the 'POS=n' going 16=>17=>28=>29... Did you skip some Posts that you didn't want to delete, between 17 and 28, or did you delete 4 consecutive Posts...?
Because if you want to delete absolutely all Posts, that should be doable without too much Difficulty, but if you want to keep some Posts, you'll need to add a little bit of "Intelligence" to your Script..., by using 'Relative Positioning' possibly if for example you only want to delete the Posts from 1 or several specific Users...

But if you want to delete ALL Posts, this one might already work:

Code: Select all

VERSION BUILD=1005 RECORDER=CR
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
'URL GOTO=https://m.facebook.com/groups/Paguyuban.Hindu
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:https://m.facebook.com/groups/Paguyuban.Hindu#
TAG POS=R1 TYPE=A ATTR=TXT:Delete<SP>post
TAG POS=1 TYPE=A ATTR=TXT:Delete
And you can loop it 100 times as you have the 'Free' Version...
If the 'POS=16' for the 1st Post was "correct", it is possible that the Script will first do "nothing" for the first 15 Loops..., or you could speed it up by editing the "SET !LOOP 1" Line into "SET !LOOP 16"...
- (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...
detom
Posts: 5
Joined: Thu Jan 17, 2019 7:53 am

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by detom » Fri Jan 18, 2019 12:41 am

Good morning Chivracq n thank you for replying,
When i recorded the 4 deletions i did not skip any posts. Perhaps the order is mixed due to posts being ordered with latest comments being bumped, or previous admin have deleted old posts randomly. I have tried to run the script you suggested and with POS 1 and it took me to 'compose a message'. When i changed it to POS 16 it opened the dropdown bar but would not go any further. If i add a delay of 2-3 seconds (conn sometimes abit slow) it'll continue to delete (somehow) on the second loop, then on the third loop it'll error with "The page you requested cannot be displayed at the moment. It may be temporarily unavailable, the link you clicked on may be broken or expired, or you may not have permission to view this page. Back to previous page". I guess a delay can be adjusted according to approx. loading/connection speed. I don't know where exactly the delays are needed so this is just a newbies guesswork.

If you are up for it you can join the group and i'll make you moderator or admin so you can try the script directly on the group, it might just save a little time. For some reason the m.facebook.com/group page would not refresh with the same adress (rdrs to mobile) so i changed it to mobile.facebook.com/group which is now consistent. I might have to switch between the two in the future depending on facebooks 'mood'. I don't want to be wasting your time to much with this so i would be happy to pay for your service. Delete 30k something posts manually would be a long tiresome procedure for me.

This is what the script look like that i ran that 'sort of worked abit' after trying the 2 suggestions you gave:

VERSION BUILD=1005 RECORDER=CR
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
WAIT SECONDS=1
'URL GOTO=https://mobile.facebook.com/groups/Paguyuban.Hindu
SET !LOOP 16
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:https://mobile.facebook.com/groups/Paguyuban.Hindu#
WAIT SECONDS=1
TAG POS=R1 TYPE=A ATTR=TXT:Delete<SP>post
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:Delete
chivracq
Posts: 8052
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by chivracq » Fri Jan 18, 2019 12:59 am

detom wrote:
Fri Jan 18, 2019 12:41 am
Good morning Chivracq n thank you for replying,
When i recorded the 4 deletions i did not skip any posts. Perhaps the order is mixed due to posts being ordered with latest comments being bumped, or previous admin have deleted old posts randomly. I have tried to run the script you suggested and with POS 1 and it took me to 'compose a message'. When i changed it to POS 16 it opened the dropdown bar but would not go any further. If i add a delay of 2-3 seconds (conn sometimes abit slow) it'll continue to delete (somehow) on the second loop, then on the third loop it'll error with "The page you requested cannot be displayed at the moment. It may be temporarily unavailable, the link you clicked on may be broken or expired, or you may not have permission to view this page. Back to previous page". I guess a delay can be adjusted according to approx. loading/connection speed. I don't know where exactly the delays are needed so this is just a newbies guesswork.

If you are up for it you can join the group and i'll make you moderator or admin so you can try the script directly on the group, it might just save a little time. For some reason the m.facebook.com/group page would not refresh with the same adress (rdrs to mobile) so i changed it to mobile.facebook.com/group which is now consistent. I might have to switch between the two in the future depending on facebooks 'mood'. I don't want to be wasting your time to much with this so i would be happy to pay for your service. Delete 30k something posts manually would be a long tiresome procedure for me.

This is what the script look like that i ran that 'sort of worked abit' after trying the 2 suggestions you gave:

Code: Select all

VERSION BUILD=1005 RECORDER=CR
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
WAIT SECONDS=1
'URL GOTO=https://mobile.facebook.com/groups/Paguyuban.Hindu
SET !LOOP 16
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:https://mobile.facebook.com/groups/Paguyuban.Hindu#
WAIT SECONDS=1
TAG POS=R1 TYPE=A ATTR=TXT:Delete<SP>post
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:Delete
Yeah..., "morning" for you, late evening for me, ah-ah...!, but 'Join Request' sent (same Name), I'll be busy the whole WE, so I can "better" have a look now and see if I can find some Solution, or that'll have to wait until Sunday or Monday...
- (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...
detom
Posts: 5
Joined: Thu Jan 17, 2019 7:53 am

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by detom » Fri Jan 18, 2019 1:06 am

Good evening :) I've accepted and added you as admin.
chivracq
Posts: 8052
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by chivracq » Fri Jan 18, 2019 1:21 am

detom wrote:
Fri Jan 18, 2019 1:06 am
Good evening :) I've accepted and added you as admin.
Yep, seen that... Now trying to "chat" with you via 'FB-Chat' for more precisions, as I don't see/find any Posts...
- (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...
detom
Posts: 5
Joined: Thu Jan 17, 2019 7:53 am

Re: Need Help Creating Post Deletion for Facebook Group (mobile)

Post by detom » Fri Jan 25, 2019 1:09 am

Hello Chivrac,
I've decided to delete posts manually instead since i couldn't not get any script working with the mobile facebook site. It's a quite long process to do manually but i can do it gradually over the time of a few weeks and the group can be actively posted in while i'm doing it manually. Thank you for your effort. :)
Post Reply