Are you aware of spam attacks on Facebook? This happened to me a year ago and now has been happening to a friend of mine. I clicked a link posted by a friend on her profile on facebook and later on my account has been posting the same link into friends walls. I did not post such link and found out on Facebook helpcenter that this is called a Spam attack. Anyway, I have manage to stop the said spam by following the steps on Facebook help center and also told my friend about the spam she had been spreading around other peoples wall.
If you have the same problem here is the explanation and procedure of how to remove and stop the spam you been spreading on Facebook, you can also look this up at facebook help center.
From Facebook Helpcenter: Spam attacks
My account is sending out spam (ex: links I didn't send) or creating events and pages I didn't create.
If you pasted text into your address bar before this happened:
This text was actually a malicious script. This script created events and pages from your account or sent your friends spammy links, instead of showing you what it advertised (ex: who viewed your profile/timeline). This is called a malicious script scam.
Close your internet window or log out of Facebook to end the attack and secure your account.
If you didn't paste text into your address bar:
It's possible that malicious software was downloaded to your computer or that your login information was phished. You can secure your account here.
To remove the spammy content:
1. Delete the post
2. Delete the page
3. Delete the group
4. Delete the event