Swab tests do in fact detect THC but they have a very limited detection period. Your friend got lucky by smoking the day of the test and I would not recommend doing this. Abstain for at least 3 days before your test and make sure to brush thoroughly and just generally practice good hygene.

Again, just be patient and abstain for a few days, brush your teeth, and you should be good to go.

Also, someone (I think FBR) posted a certain technique that you actually do with the swab itself to increase your chances of passing. I believe it had something to do with barely touching the cheek of your mouth when administering the swab.