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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:58:27+00:00 2026-05-26T09:58:27+00:00

I have a page up and running, (https://blooming-wind-8528.herokuapp.com/) using the following code: App.rb contains:

  • 0

I have a page up and running, (https://blooming-wind-8528.herokuapp.com/) using the following code:

App.rb contains:

require 'rubygems'
require 'sinatra'
require 'open-uri'
require 'json'

#show page
get "/" do
  profile = open("https://graph.facebook.com/me?access_token=#full_access_code_here_removed_for_stackoverflow#").read
  profile = JSON.parse(profile)
  @language = profile['locale'][0..1]

  erb :nofan
end

#redirect for facebook
post "/" do
  redirect "/"
end

views/nofan.erb contains:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Stestie</title>
    <meta property="og:title" content="No Fan"/>
    <meta property="og:type" content="website"/>
    <meta property="og:url" content="https://blooming-wind-8528.herokuapp.com/"/>
    <meta property="og:image" content="https://blooming-wind-8528.herokuapp.com/images/marker_s.png"/>
    <meta property="og:site_name" content="NO fan"/>
    <meta property="fb:app_id" content="293597294002599" />
    </head>

  <body>
        <p>App running in language: <%= @language %></p>
    </body>
</html>

Now, the weird thing: In the browser it loads perfectly. However, on facebook it’s not working. I get a blank screen.
However, when I invoke an error code (for example: changing the access token to something wrong), I get a full fledged sinatra error page inside the iframe…

Does anybody know what I’m doing wrong?

Thx!

  • 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-26T09:58:28+00:00Added an answer on May 26, 2026 at 9:58 am

    Sinatra tries to avoid a click-jacking attack.

    Add this line:

    set :protection, :except => :frame_options
    

    or this line:

    disable :protection
    

    to you application.

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

Sidebar

Related Questions

I have a html page which loads a flash(flex) swf file. Using https it
Let's suppose I have an applet running within a page in a browser. What
Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a
I have a page using <ul> lists for navigation (Javascript changes the styling to
I'm using Ubuntu 10, python 2.6.5 I'm following this tutorial: http://www.djangobook.com/en/2.0/chapter02 I followed all
I have a JSP page that has 2 forms running on Tomcat 6. One
I have a login.jsp page which contains a login form. Once logged in the
I have a jsp page running under jboss 4.2.2 server. The structure for the
Background A customer is running our web app. over HTTPS and are running into
I have an mvc2 app which is serving content through iframes. The iframed page

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.