I have an FB application that works fine with postbacks from MVC, but when I try to send some data to a controller that has a requireauthorize attribute using jquery $ .post (), FB redirects it and I canβt get it to work It only returns a block of script code, which I believe is a reference to FB or something like that.
Example: user interface button. Click Code
$.post("/Friends/Save", "{ 'requestIds':'"+ response.request_ids + "'}", function (data) {
alert("Friend requests saved!");
});
My MVC controller code:
[HandleError]
public class FriendsController : Controller
{
[CanvasAuthorize(Perms = "user_about_me")]
public JsonResult Save(string requestIds)
{
return Json(new { Status = "Saved!" });
}
}
If I comment on an attribute, everything works fine. Anyone can help me on how this can be done? I need to check every record that he performed as a registered user of FB!
Thanks in advance! Have a nice day everyone!