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 6751807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:58:14+00:00 2026-05-26T12:58:14+00:00

I have the following code to check if my tab is liked by the

  • 0

I have the following code to check if my tab is liked by the user:

        protected bool IsPageLiked()
    {
        try
        {
            var current = ConfigurationManager.GetSection("facebookSettings")
                          as IFacebookApplication;
            dynamic data = FacebookWebContext.Current.SignedRequest.Data;

            if (data.page != null)
            {
                var pageId = (String)data.page.id;
                var isUserAdmin = (Boolean)data.page.admin;
                var userLikesPage = (Boolean)data.page.liked;
                if (userLikesPage)
                    return true;
            }
        }
        catch (Exception ex)
        {
            return false;
        }
        return false;
    }

This works correctly when I load my tab initially.
However, if I try and call the same code after changing page within the tab, I get the following error:

{“Precondition failed: !String.IsNullOrEmpty(signedRequestValue)”}

Is there a way I can make this code work after the first page?

I know I can check if the tab is liked on the first page, and put this into a session object or something, but I’d prefer not to do this.

My app itself is MVC 3

Thanks

EDIT

I think what is happening is when I change page (I’m using a RedirectToAction method), it’s loosing the signed_request query string, hence the error I am getting.

Edit 2

Not sure the above is what is happening after all, as I can’t see any query string values on the initial page? It’s still not able to get the signedrequest.

It looks like the signed_request is a form object (Request.Form[“signed_request”] returns the string in the inital page, but not the second page).

  • 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-26T12:58:15+00:00Added an answer on May 26, 2026 at 12:58 pm

    Page tabs are basically just your app within an iframe on the page, like you’ve noticed the signed request is POSTED to the tab on page load.

    When you change page within the tab the outer Facebook frame isn’t reloading so the signed_request is not being re-posted to your tab which is why you can’t access it again.

    You will need to either pass the signed_request from one page to the next yourself or make sure all links use target=”_top” so that the whole page is reloaded each time and you still get the POST.

    To define which page you want your tab to load you can use an additional parameter called app_data in the url to your tab, eg

    http://www.facebook.com/MY_PAGE?sk=app_MY_APP_ID&app_data=A_STRING_OF_DATA

    Your tab will then receive this as part of signed_request, you can grab it and use it to work out which page your tab needs to display.

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

Sidebar

Related Questions

I have the following code to check for valid users: protected void Login_LoginError(object sender,
I have the following code to check a checkbox as soon as the user
I have following code to check a checkbox when user presses any key. However
I have the following PHP code // Check if the upload is setted if
I have the following piece of code to check for supported intents. The code
I have the following code: foreach (ListItem item in check.Items) { if (item.Selected) {
I have the following piece of code where check is for char type do{
I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I have the following code to check for form data and I can't figure
I have following code in my template: <div class=account> {% if request.user.is_authenticated %} <a

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.