In order to resist friend-in-middle attack in Social Networks(SNS),a new protocol is proposed to solve above issues. Combined with Exclusive OR(XOR) coding, cryptology schemes of hash function and message authentication,the protocol is easy to be carried out and light-weighted. Through security and computing overhead analysis,the protocol has been proved to be efficient in resisting friend-in-middle attack and replay attack,as well as largely reducing computation overhead,cutting down the storage space. As other protocols at present can not efficiently solve above issues,the new one is evidently advanced and applicable.