Using Trademarked Names
Question: Is it legal to use a Trademarked name such as Facebook in a novel where it is simply a part of the story. For example "Bob made a Facebook account and added many new friends while he was online"Answer:
This may be the last time I answer this question, because I'm not a lawyer and it's a little outside my expertise. And besides, I've answered it before.
However, the generally accepted wisdom is that it's fine to mention trademarked product names, companies, etc. in passing. If anything, you're giving the company free advertising, so they would hardly complain.
The exception is if you are engaging in libel or slander. For instance, if you were to depict Facebook as a dishonest or criminal enterprise. In that case, you should either create a fictitious social network or, if you really think a particular company is a villain in real life, abandon the novel project and consider writing a non-fiction expose based on solid evidence (assuming any exists).
Fortunately, if you are published through a mainstream publisher, it or your agent will likely have a lawyer who can advise on such matters. If you are self-publishing, you can hire your own lawyer, if you are seriously concerned.
But until you get to that stage, you have more important things to worry about, like telling a good story about intriguing characters.
If you want a more detailed answer, here's another writer's take on the issue...