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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:55:11+00:00 2026-05-25T22:55:11+00:00

How do i get app_data querystring from a Facebook webforms app? I want to

  • 0

How do i get app_data querystring from a Facebook webforms app?
I want to be able to send some info in the querystring so i can display different home screen on my app.
The app is sittin in a page tab.

Example:
http://www.facebook.com/pages/APPNAME/157772164271503?sk=app_230501256972470&app_data=Page.aspx

How do i get “Page.aspx” from app_data?
I need it to redirect the user to a different page from Default.aspx

I found the solution.
Get Querystring from facebook tab app using asp.net

using Newtonsoft.Json.Linq;
using System.Text;

public partial class Page_Default : System.Web.UI.Page
{
    protected string output = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        output = "Whole thing:" +Request.Form["signed_request"];
        output += "Second part:" + Request.Form["signed_request"].Split('.')[1];

            try
            {
                string payload = Request.Form["signed_request"].Split('.')[1];
                var encoding = new UTF8Encoding();
                var decodedJson = payload.Replace("=", string.Empty).Replace('-', '+').Replace('_', '/');
                var base64JsonArray = Convert.FromBase64String(decodedJson.PadRight(decodedJson.Length + (4 - decodedJson.Length % 4) % 4, '='));
                var json = encoding.GetString(base64JsonArray);
                var o = JObject.Parse(json);

                output += "Decoded:" + json;

                bool liked = (bool)o.SelectToken("page.liked");

                output += "Liked:" + liked.ToString();
            }
            catch (Exception ex)
            {
                output += "Extract failed: " + ex.Message;
            }
    }
}

Also this post was helpfull

just be shure to add the direct page in facebook app settings ex. http://www.site.com/deafult.aspx not http://www.site.com

  • 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-25T22:55:11+00:00Added an answer on May 25, 2026 at 10:55 pm

    In the JSON array that facebook posts, one of the top level keys is ‘app_data’, if it’s specified. So you can to it just as you did for ‘liked’ but instead of ‘page.liked’ it would just be ‘app_data’ (and not a boolean)

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

Sidebar

Related Questions

I have a .net-website project and want to get some file from app_data folder.
How can my app get a valid last time connected to domain timestamp from
We have a SaaS web app and are looking to get some feedback from
I'm trying to get insights from facebook for some pages I have admin rights
I have an app that must get data from the Sqlite database in order
I want to use a data file and read it from a WinForms app.
I have a toy facebook app I'm playing with so I can understand how
When i call my fb-app with a GET request, like ?app_data=1, the variable is
I am just testing an app to get data off our web server, previously
I can't find a correct way to get the environment variable for the appdata

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.