When a person enters the U.S. on a B1/B2 tourist visa, the purpose of the visit should be temporary. Getting married to a U.S. citizen is not prohibited during the temporary visit. The real issue is whether you misrepresented material facts to obtain entry into the U.S. For example, if you had preconceived intent to marry and stay permanently in the U.S., and you told the US Customs Officer that the purpose of your visit was only a temporary visit with friends, this could be construed as immigration fraud.
Your friend might be referring to the U.S. Department of State's 30/60 day rule. When a foreign national marries a U.S. citizen or applies for permanent residence within 30 days of entry, the Department of State (DOS) presumes that he misrepresented his intent in seeking a visitor visa or entry. If the marriage or green card application occurred after 30 days but within 60 days of entry, the DOS does not presume there was misrepresentation. If the facts in the case provide a reasonable basis to believe the foreign national misrepresented his intent, the DOS allows him to present rebuttal evidence. If the marriage or green card application occurred after 60 days, the DOS does not consider such conduct to constitute fraud or willful misrepresentation to obtain immigration benefits.
In your case, you married after 30 days, but within 60 days. USCIS is a separate agency from the DOS and does not have to follow the DOS policy (although it may use the policy as guidance). The Board of Immigration Appeals has held that immediate relatives are exempt from the 30/60 day rule. In other words, immediate relatives of U.S. citizens who wish to apply for adjustment of status may do so at any time, even within 30 days of entry into the U.S. But generally, it's best to wait until at least 60 days have passed before you marry and/or apply for a marriage-based green card.
As the spouse of a U.S. citizen, you may file a one-step petition for a green card/adjustment of status, i.e. your US citizen spouse files the I-130 petition and you concurrently file the I-485 application with USCIS. USCIS recognizes that plans change and the decision to marry could have been made only after you entered the U.S. Furthermore, if the US Customs Officer never asked about the specific purpose of your visit and you did not provide any misleading information, there is no fraud/willful misrepresentation. Staying silent or failing to volunteer negative information that is not being requested does not amount to fraud/willful misrepresentation. If necessary, you may also file a Form I-601 waiver of inadmissibility (due to fraud).
If you leave the US to apply for a CR1 (conditional resident) visa, based on I-130 approval, you will be subject to the DOS' 30/60 day rule. And if you accrue at least 180 days of unlawful presence before you depart the U.S., you will be subject to the 3/10 year bar to re-entry. In that event, an I-601 waiver of inadmissibility (due to unlawful presence) will be required. You might also need an I-601 waiver for the additional ground of fraud.
For more information, see:
Applying for a Marriage-Based Green Card Following Entry Into the U.S. as a Visitor. http://bit.ly/1IU2xVM
5 Things to Do to Get Your Marriage-Based Green Card. http://bit.ly/1Lxty2h
What to expect at your marriage-based green card interview. http://bit.ly/1EtkO9V
You should consult an immigration attorney to help you determine the best route to take. In general, consular processing carries more risks, but it really depends on your specific situation. At the very least, you want to have an attorney at the green card interview, if you choose to stay in the U.S. and file the one-step petition.