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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:31:25+00:00 2026-05-24T12:31:25+00:00

So I have a page on facebook that has some tabs via apps that

  • 0

So I have a page on facebook that has some tabs via apps that I’ve made. They are promotional tabs. For some of those tabs I’d like to show alternate teaser content until they have “liked” the page. I am NOT using PHP, so JS or Ruby only please.

I do not need to do any fb connect stuff, nor do I need to know if they like the app/page from my website… all of what I need will take place on facebook via iframe.

Thanks!

[edit: check out redbull’s fan page: http://www.facebook.com/redbull this is what I would like to do]

  • 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-24T12:31:26+00:00Added an answer on May 24, 2026 at 12:31 pm

    Got a working solution without PHP. Thanks to dwarfy at this post for inspiration.

    This is NOT a JS solution, and I don’t think that what I am interested in doing can be done with JS because it would involve cross-site scripting, which is a no-no. In short, you have to digest signed_request in one way or another if you want to tell if someone likes your page via your iframed app.

    So my app is Ruby on Rails. On the FB side I kept things in sandbox mode and worked/tested in prod. Not sure how to get a suitable local environment to test. anyway…

    • I installed/required the gem fbgraph.
    • created a gate controller & views: rails g controller gate index fbindex

    app/controllers/gate_controller.rb:

    class GateController < ApplicationController
      def index
      end
    
      def fbindex
          app_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
          @signed_request = FBGraph::Canvas.parse_signed_request(app_secret, params[:signed_request])
      end
    end
    

    app/views/gate/index.html.erb:

    <h1>Gate#index</h1>
    <p>Find me in app/views/gate/index.html.erb</p>
    
    <form action="/gate/fbindex" method="post">
    
    signed request: <input type="text" name="signed_request">
    <input type="submit"/>
    </form>
    

    app/views/gate/fbindex.html.erb:

    <h1>Gate#index</h1>
    <p>Find me in app/views/gate/fbindex.html.erb</p>
    
    <%= @signed_request.inspect %>
    
    
    <% if @signed_request["page"]["liked"] %>
    You like me!
    <% else %>
    You suck, cuz you don't like me
    <% end %>
    

    Get your FB settings right:
    enter image description here

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

Sidebar

Related Questions

I have a Facebook like that links to a page on witch I don't
I have an app on http://apps.facebook.com/myappname that is a canvas page of http://mydomain.com .
I have an extremely simple page that I'm trying to view in the Facebook
I would like to have my canvas page on facebook display different content for
I have a promotional Facebook page set up which anyone is allowed to comment
I have some doubts: I want to show the photos from my company facebook
I have a client who has a fancy facebook page and it looking to
I have an app that has an IFrame with a page flash overly allowing
In my web application I have a user profile page. That page has these
I'm wondering about this: I have a simple facebook-connect app that will only show

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.