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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:58:36+00:00 2026-05-20T17:58:36+00:00

I’m using build 5.06 of the toolkit and I’m just getting started, trying to

  • 0

I’m using build 5.06 of the toolkit and I’m just getting started, trying to do something simple: get a postback to work. But when the user clicks the postback button, the browser is redirected to something quickly (I think it’s uiserver.???) and then redirected again to facebookredirect.axd, and finally again to my home canvas page. So, the entire session is pretty much reset. I’m hoping there’s something obvious that I’m missing (like I should not call authorize on the postback?). Here’s my code:

using System;
using System.Configuration;
using System.Web.UI;
using Facebook;
using Facebook.Web;

public partial class _Default : Page
{

/// <summary>
/// Gets the current canvas facebook session.
/// </summary>
public FacebookSession CurrentSession
{
    get { return (new CanvasAuthorizer()).Session; }
}

protected void Page_Load(object sender, EventArgs e)
{

    var auth = new CanvasAuthorizer { Permissions = new[] { "user_about_me" } };

    if (auth.Authorize())
    {
        ShowFacebookContent();
    }
}

private void ShowFacebookContent()
{
    var fb = new FacebookClient(this.CurrentSession.AccessToken);
    dynamic myInfo = fb.Get("me");
    lblName.Text = myInfo.name;
    lblName.Text += myInfo.gender;
    pnlHello.Visible = true;
}


protected void TempSaveButton_Click(object sender, EventArgs e)
{
    var auth = new CanvasAuthorizer { Permissions = new[] { "user_about_me" } };
    if (auth.Authorize())

    {
        var fb = new FacebookClient(this.CurrentSession.AccessToken);
        dynamic myInfo = fb.Get("me");
        lblDisplayText.Text = "Was authorized! name is" + myInfo.name;
    }
    else
    {
        lblDisplayText.Text = "Was not authorized!";
    }
}

}

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">


</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">


<asp:Label runat="server" ID="a" />
<asp:Panel ID="pnlHello" runat="server" Visible="false">    </asp:Panel>
    <h2>
        Hello
        <asp:Label ID="lblName" runat="server" />!
         </h2>   
        <div>Hello ! Please press button to do postback.

<asp:Button ID="TempSaveButton" Text="Temp Save" runat="server" onclick="TempSaveButton_Click"></asp:button>



<asp:Panel ID="pnlError" runat="server" Visible="false">
    <a href="Default.aspx">
        <asp:Label ID="lblDisplayText" runat="server" ForeColor="Red" /><br />
    </a>
</asp:Panel>

(in the above, the label does not get set at all after the postback.

Thanks for any help…

-Ben

  • 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-20T17:58:37+00:00Added an answer on May 20, 2026 at 5:58 pm

    You will need to maintain the signed_request manually for postbacks and ajax requests.

    Try creating a hidden input field which contains the signed_request.

    <input type="hidden" name="signed_request" value="<%: Request.Params["signed_request"]%>"/>
    

    Name the hidden field signed_request. So when you type the following code, access_token is automatically set.

    var fb = new FacebookWebClient();
    

    For mvc there is a helper method for this.

    @Html.FacebookSignedRequest()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
We're building an app, our first using Rails 3, and we're having to build
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm making a simple page using Google Maps API 3. My first. One marker
I need to clean up various Word 'smart' characters in user input, including but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is

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.