SAN FRANCISCO — Enterprising lawyers beware: using Facebook as an investigative tool may get you into trouble with the bar, says an ethics opinion from the San Diego County Bar Association.

The opinion concludes that sending a Facebook “friend request” to a represented party violates California Rule of Professional Conduct 2-100 and could be cause for discipline. The opinion’s author, Daniel Eaton, said it’s the first to confront ex parte communication through social media.