If you used the company's equipment to save, edit, upload, or view the picture, then there was no reasonable expectation of privacy. The company did not have to use keylogger software or know your Facebook password to discover you had uploaded the picture to your Facebook account or viewed the picture while logged into your Facebook account. There are several ways the company could have discovered that you used their equipment to upload the picture to Facebook without knowing your Facebook password. It is unlikely that you have a viable invasion of privacy claim based on these facts.
There are a lot of questions you raised. Look at the employee handbook that would tell you the conditions of why they could fire you. If the did not meet those conditions contact an attorney who does employement law. As far as your actions, you probably are at a higher level of security given your position which can impact what you can and cannot do.
A facebook warning. It is not as private as one might think. Simply one of your facebook friends might have shown the picture to the company.
Termination of you on these facts was not unlawful. You were an at will employee and subject to termination for any reason not specifically prohibited by law or in violation of public policy. Using your employer's time and equipment for the purpose that you have admitted here is not a prohibited basis for employer action. It really does not matter, for purposes of wrongful termination analysis, how the employer found out about your transgression. Employers are not the police and there are no 4th amendment motions to suppress in employment law. Be prepared for a fight over unemployment benefits.
My responses to questions on Avvo are never intended as legal advice and must not be relied upon as legal advice. I give legal advice only in the course of an attorney-client relationship. Exchange of information through Avvo's Questions forum does not establish an attorney-client relationship with me. That relationship is established only by individual consultation and execution of a written agreement for legal services.