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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:15:25+00:00 2026-05-25T19:15:25+00:00

The problem is that 1) Facebook seems so fluid with how it allows developers

  • 0

The problem is that 1) Facebook seems so fluid with how it allows developers to interact with it (FBML, iFrame, different versions of SDKs) and 2) Everything I find is either PHP or Javascript and I have NO experience with those. What I am trying to do seems sooo simple, and I can’t believe there isn’t an easy way to do this.

What I have:

  • I used Visual Studio 2010 to create a simple web application (asp.net/C#) that asks the user for some info (first name, last name, email, etc.). I have a button on there called “Submit” that, when clicked, saves the entered data into a database. I have this hosted on GoDaddy (I know, I know…heh) and it works just fine. No problem here.

  • I created a “Facebook App” that uses the iFrame thingy so that basically I have a new tab on Facebook that displays my web app mentioned above. This works fine too. The tab is there, the web app is there, and users can enter the data and it is saved to the database. No problem here.

What I WANT:

  • I want the web app (the thing displayed by the facebook app) to only show the data entry part if the user currently “likes” the facebook entity. I DO NOT want to have to ask permission. I just want to know if they are a fan of the company’s facebook “page” that has this app. So I need two things here, shown in my pseudo code below:

Part 1 (check if user is already a fan):

If (user is fan)
{
    Show data entry area (unhide it)
}
else
{
    Show "Click the like button to see more options"
}

Part 2 (listen for “like” event)

WhenLikeButtonPressed()
{
    Show data entry area (unhide it)
}

I’ve seen stuff about “visible to connection”, C# sdk, edge.create, etc. but I just can’t make heads or tails of it. I don’t mind putting in Javascript or PHP if someone could please give me exact, “Fan Gate for Dummies” steps. Please, I’m going crazy over here 🙁

  • 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-25T19:15:25+00:00Added an answer on May 25, 2026 at 7:15 pm

    The key is is the signed_request that Facebook posts to your app when the user accesses the page. It contains the data on whether or not the user likes the page. You shouldn’t need to worry about catching edge events on an actual tab FB page as it get’s reloaded when the user likes/unlikes the page.

    You’ll need to decode the signed request with your app secret to get the like info. There are examples provided for PHP but I’m sure with a little google help you can find decode info for the signed_request for asp.net/c#.

    Here’s the php decode for reference:

    function parse_signed_request($signed_request, $secret) {
    list($encoded_sig, $payload) = explode('.', $signed_request, 2); 
    
    // decode the data
    $sig = base64_url_decode($encoded_sig);
    $data = json_decode(base64_url_decode($payload), true);
    
    if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
      error_log('Unknown algorithm. Expected HMAC-SHA256');
      return null;
    }
    
    // check sig
    $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
    if ($sig !== $expected_sig) {
      error_log('Bad Signed JSON signature!');
      return null;
    }
    
    return $data;
    }
    
    function base64_url_decode($input) {
    return base64_decode(strtr($input, '-_', '+/'));
    }
    

    and the link https://developers.facebook.com/docs/authentication/signed_request/ the like info will be contained in the page variable

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

Sidebar

Related Questions

I'm trying to use Facebook connect in an IFrame. It seems that after the
I have a facebook app run inside an iframe. The problem is that if
My problem is that I want to know the users that uninstall my facebook
I previously have an FBML application in Facebook and now change to an IFrame
One problem that I come across regularly and yet don't have a solution to
A problem that we need to solve regularly at my workplace is how to
The problem that I am having has to do with the need to keep
A problem that has frequently come up in my career is I have some
Simple problem that I can't figure out... How can I print a '%' character
I have a problem that confuses my users, being that although an item 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.