I'm looking for a script that loops through the last ten or twenty posts on my page and invites every one that has interacted to the page.
Exactly like this, which is what Im looking at but instead of clicking on every individual post, it would do this for the most recent.
Just change the amount of buttons you iterate through, instead of buttons.length, change to a number like 10, 15, 20 or however many you want to include.
I dont think this would work just by changing the buttons.length. Since the people that interacted is not visible.
You said loops through the last ten or twenty posts so you would need to loop through the elements to find those items you want to add.