1. Log in to your Facebook account using Google Chrome.
2. Visit page or event where you want to invite friends.
3. Click on invite friends.
4. Scroll your friends list down.
6. Copy the script which is given above and paste it in web console.
7. Press enter.