As far as I know this would be against the terms of facebook.
You should select the friends to whom this might be of interest yourself and by hand.
Any way to do that automatically is considered spammy activity and even if there ARE ways to do that technically it's not allowed and clearly not welcomed by facebook officials.
Anybody can click F12 and make entries in the console of any webpage. This code is shared widely on a Facebook page that Facebook is not planning to take down. It's a workaround, not spamming.