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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:36:47+00:00 2026-05-22T23:36:47+00:00

I am using c# 4.0 and I am integrating facebook registration plugin Can somebody

  • 0

I am using c# 4.0 and I am integrating facebook registration plugin
Can somebody please tell me what I need to do to read signed request.
I have downloaded Facebook.dll and Newtonsoft.Json.dll
I also have valid
App ID: ***
API Key: **********
App Secret:
*************
If possible please give me a sample code how should I pass these keyes and how I can collect the decoded data sent in form of signed request.

Thanks:

  • 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-22T23:36:47+00:00Added an answer on May 22, 2026 at 11:36 pm

    There must be more easy ways to read signed request following is what I am using. There are few steps involved to read facebook signed request in c#

    1. Dot net 2010 is required to follow these steps. It is suggested if you make a new web based project named “fb” when you done then you may import this code to your real project.
    2. Download source from http://facebooksdk.codeplex.com/SourceControl/changeset/view/f8109846cba5#Source%2fFacebook%2fFacebookApp.cs
    3. After unzip you will get “facebooksdk-f8109846cba5” inside it you will find a folder facebooksdk-f8109846cba5\Source\Facebook in this folder look for “Facebook.csproj”
    4. Open “Facebook.csproj” in vs 2010 Look for file “FacebookApp.cs” open this file and search “internal protected FacebookSignedRequest ParseSignedRequest(string signedRequestValue)
    5. Change “internal protected” to “public”
    6. Then build the project by right click on project. Now it’s complied file (“Facebook.dll”) is ready to use. Copy it to your project bin directory and add its reference.
    7. Now download Json.Net 3.5 release 8 from http://json.codeplex.com/releases/view/50552 and add to your project bin folder and also add its reference.
    8. Now you are ready to read signed request. It is time to write code to read signed request.
    
    using System;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Text;
    using Facebook;
    using Newtonsoft.Json.Linq;
    using Newtonsoft.Json.Serialization;
    using System.Collections.Generic;
    
    namespace fb
    {
        public partial class test3 : System.Web.UI.Page
        {
    
    
    
            protected void Page_Load(object sender, EventArgs e)
            {
    
                FacebookApp fap = new FacebookApp();
    
    
                fap.AppId = "************";
                fap.AppSecret = "********************";
    
                string requested_Data = Request.Form["signed_request"];
    
                FacebookSignedRequest fsr = fap.ParseSignedRequest(requested_Data);
    
    
               // string json = JsonConvert.SerializeObject(fsr.Dictionary, Formatting.Indented);
    
    
                UserData ud = new UserData(fsr);
    
                Response.Write(ud.name + "
    "); Response.Write(ud.birthday + "
    "); Response.Write(ud.country + "
    "); Response.Write(ud.email + "
    "); Response.Write(ud.gender + "
    "); Response.Write(ud.location + "
    "); Response.Write(ud.userId + "
    "); } } public class UserData { public UserData(FacebookSignedRequest fsr) { string value = string.Empty; JObject o; foreach (string key in fsr.Dictionary.Keys) { value = fsr.Dictionary[key]; switch (key) { case "user_id": userId = value; break; case "registration": o = JObject.Parse(value); name = GetValue(o, "name"); birthday = GetValue(o, "birthday"); email = GetValue(o, "email"); gender = GetValue(o, "gender"); location = GetValue(o, "location.name"); break; case "user": o = JObject.Parse(value); country = GetValue(o, "country"); break; } } } private string GetValue(JObject o, string token) { string ret = string.Empty; try { ret = (string)o.SelectToken(token); } catch (Exception ex) { throw ex; } return ret; } public string name { get; set; } public string birthday { get; set; } public string gender { get; set; } public string location { get; set; } public string country { get; set; } public string email { get; set; } public string userId { get; set; } } }
    1. This is what I am using and its working fine for me.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded Prabir's application ASP.NET MVC Canvas App using Facebook C# SDK showing
I am integrating Facebook authentication, registration and app requests with our web app, using
Does anyone have experience writing a Facebook application using GWT with GAE? I'm new
I am integrating in my application a sign on using facebook and twitter. I
I am using facebook sdk and facebook connect for integrating fb into my site
I have an ASP.NET MVC 3 application with some Facebook integration using the Facebook
I am integrating facebook single signon using the facebook Javascript library. I am using
I am integrating with an application that uses plugins. I have my own plugin
I'm currently integrating Facebook with my website using the Javascript SDK. I've got the
I tried using facebook API but once i tried integrating it. I noticed that

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.