Form Post with Facebook C# SDK

前端 未结 1 679
余生分开走
余生分开走 2020-12-20 00:10

Can anyone point me in the direction of how I can use a form post with the Facebook C# SDK in an MVC app? It\'s an iframe based Canvas application.

I have the follow

相关标签:
1条回答
  • 2020-12-20 00:48

    There is actually a helper for MVC forms that will fix this issue for you.

    The helper goes inside your form:

    Razor Syntax:

    @Html.FacebookSignedRequest();
    

    ASP.NET Syntax

    <%=Html.FacebookSignedRequest() %>
    

    All this actually does is store your signed_requeset as a hidden on your form. This way when the form is posted the Facebook authenticator will be able to reauthorize the request.

    0 讨论(0)
提交回复
热议问题