Passing the signed_request along with the AJAX call to an ActionMethod decorated with CanvasAuthorize

落爺英雄遲暮 提交于 2019-12-04 21:03:06

Make sure you hidden input field is being populated.

Also, when you try to pull the ID of the input field via JQuery, you might not be referencing the proper element since .NET butcher's ID's of anything that's run on the server.

When I use the hidden input field trick, I set the jquery value like so:

var signedRequest = $('#<%=signedReq.ClientID %>').val();

This way, I'm getting the identifier that .NET is giving to the HTML element.

Hope that helps.

Just a guess - in your hidden field: id="signed_request" instead of id="signedReq"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!