You've just discovered your Facebook account has been posting all kinds of weird, pornographic, or generally inappropriate content to your Wall and/or News Feed. Your friends are annoyed with all the questionable posts and requests coming from you.
Did you forget to log out of Facebook at your friend's house, did you accidentally click on something you shouldn't have, or has your account been hacked?
I can't answer these questions without actually seeing what's happening on your profile, but I can offer some advice. Here are four things you should try in order to clean up your Facebook account.
My account is hacked. If your account is sending out spam (ex: advertisements or suspicious links) or was taken over by someone else, secure it here.
After you've navigated to facebook.com/hacked, click the blue "Continue" button and follow the instructions.
In this case, you should change your password on Facebook. If you don't know how to do so, you can refer to the following guide: How to change your Facebook password.
If changing your password fixes your Facebook problems, you should change your password for all your other services too, especially if you use the same password for them as you previously used on Facebook. If this doesn't fix the problem, try the next step.
Your best bet is to remove all the Facebook apps you find suspicious. If you don't know how to do so, you can refer to the following guide: How to clean up your Facebook apps.
If cleaning out your apps fixes your Facebook problems, tell your friends they should do the same (chances are the app asked your friends to install it as well). If this doesn't fix the problem, try the next step.
I recommend Microsoft Security Essentials –it's free and gets the job done very well. Another good one is Malwarebytes. Other free alternatives include Avira and Avast.
The aforementioned security programs are for Windows. If you have a Mac, try using the antivirus from Sophos.
After running the virus scan, clean out whatever the program detects. If you're not sure about what it found, ask a friend who might.