Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3958142
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:34:32+00:00 2026-05-20T02:34:32+00:00

I have a FB app that is working nice with the postbacks from within

  • 0

I have a FB app that is working nice with the postbacks from within MVC but when i try to post some data to a controler that has the requireauthorize attribute, using jquery $.post() , FB redirects it and I can’t get it work. It only returns a block of script code instead, which i believe is the ridirection from FB or something.

Example: UI button Click code

//Client side JS button click event
$.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)
    {
        //Save to DB
        //(....)

        return Json(new { Status = "Saved!" });
    }
}

If i comment the attribute everything works fine, Anyone can help me out on how can this be done ?
I need to check for every post that it is done by a FB logged in user!

Thanks in advance! Have a good day all!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:34:32+00:00Added an answer on May 20, 2026 at 2:34 am

    I experienced this same issue. My solution was to separate the Get and Post controller methods (via [AcceptVerbs(HttpVerbs.Get)] and [AcceptVerbs(HttpVerbs.Post)] ) and only put the [CanvasAuthorize] attribute on the Get method. When I perform my ajax Post I include the signed request in the post which I can use to get the access token.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nice working iphone app that works with core data. I use
I have a rails blog app that was working well.. However, I did some
I have a DataGridView control in a winforms app that I'm working on. The
In an app I'm working on, I have a plain style UITableView that can
I have written a universal app that's working fine on both iPhone (iPod Touch)
I have an app that is crashing on the iPhone, but only when it
I'm working on an google app engine app that will have to deal with
I have an app that needs to open a new window (in the same
I have an app that executes commands on a Linux server via SSH just
I have a app that I'm deploying to a development server using Capistrano. I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.