要求Facebook喜欢连接到无线网络

I have received a request from a friend today. He owns a coffee shop and there is a free WIFI access point. Now he wants to require the visitors to like the coffee shop's Facebook page to connect to the network. I don't know how I can do this. His router is a TP-Link TL-WR940N.

My idea:

  • Install DD-WRT
  • Redirect to custom login page
  • On the custom login page, use Facebook API for Facebook login
  • After the user logs in, check if he/she liked the page
  • If not, redirect them to the shop's Facebook page

The bad thing is that I can't redirect them back after liking the page.

Is there any better solution?