Created
November 28, 2016 15:37
-
-
Save Msirkovsky/7cdb4e525d949ae9a2389fc8a9caae17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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