Skip to content

Instantly share code, notes, and snippets.

@Msirkovsky
Created November 28, 2016 15:37
Show Gist options
  • Save Msirkovsky/7cdb4e525d949ae9a2389fc8a9caae17 to your computer and use it in GitHub Desktop.
Save Msirkovsky/7cdb4e525d949ae9a2389fc8a9caae17 to your computer and use it in GitHub Desktop.
public ActionResult Receive()
{
var query = Request.QueryString;
_logWriter.WriteLine(Request.RawUrl);
if (query["hub.mode"] == "subscribe" &&
query["hub.verify_token"] == "myToken874523")
{
//string type = Request.QueryString["type"];
var retVal = query["hub.challenge"];
return Json(int.Parse(retVal), JsonRequestBehavior.AllowGet);
}
else
{
return HttpNotFound();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment