1. Log in to Facebook
2. Open "Developer Tools" (F12), select the "Network" tab, locate "Request Headers", Alt-click on "Cookie:" and select "Copy value". Use this in each HTTP request. Do not log out yet.
The URL for the Friends list is
https://mbasic.facebook.com/friends/center/friends/?ppk=1
where 1 is the page number.Using m.facebook.com as the domain will also work. There 10 friends per page.
3. Extract the UID for each friend from the HTML and create the new "unfollow" URLs.
grep -o "uid=[^&]*" 1.html|sed 's>uid=/https://mbasic.facebook.com/a/subscriptions/remove?subject_id=>'
4. Log out.Done.