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

  • Home
  • SEARCH
  • 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 6752885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:05:48+00:00 2026-05-26T13:05:48+00:00

Are we able to use the Facebook C# SDK to decode the signed_request parameter

  • 0

Are we able to use the Facebook C# SDK to decode the signed_request parameter that is passed to the Facebook Tab page, without using Authentication? Basically, I am looking for a way to decode and parse the page JSON object that the signed_request contains.

I am looking for the .NET C# equivelent to accomplishing the same type of decode in this PHP example: Seamless way to check if user likes 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-26T13:05:48+00:00Added an answer on May 26, 2026 at 1:05 pm

    I am just pasting same answer I have answered in another post.

    Fans-only content in facebook with asp.net C# sdk

    You get signed request when your web page is loaded within facebook canvas app; you should be able to parse signed request something similar to following:

    if (Request.Params["signed_request"] != null)
    {
        string payload = Request.Params["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);
        var lPid = Convert.ToString(o.SelectToken("page.id")).Replace("\"", "");
        var lLiked = Convert.ToString(o.SelectToken("page.liked")).Replace("\"", "");
        var lUserId= Convert.ToString(o.SelectToken("user_id")).Replace("\"", "");
    }
    

    You need to add reference to json libraries in order to parse signed requestin C#, download from http://json.codeplex.com/

    Also refere to How to decode OAuth 2.0 for Canvas signed_request in C#? if you are worndering about signed request.

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

Sidebar

Related Questions

The init() is able to use the parameter passed to it in this example:
I'm able to post to my Facebook wall page when logged in using a
I have an app that needs to be able use either an sqlite3 datebase
I am able to use the NHibernate Criteria API for an IN statement using
I am migrating my Facebook canvas application to using the new PHP SDK. However,
Users have been able to log into my website using their Facebook account, but
I want users to be able to use the facebook send button to send
Our app uses the PHP- aswell as the JS-SDK of Facebook. We are able
I am creating a web application that is trying to use public Facebook content.
I want users to be able to use Facebook Connect on MY website. And

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.