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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:32:44+00:00 2026-06-01T10:32:44+00:00

I’m currently building a Facebook Application for a client using the new timeline layout

  • 0

I’m currently building a Facebook Application for a client using the new timeline layout which means no landing pages etc. Anyway, there’s an app that we want users to go to which has one of those annoying ‘Fan Gates’ where you must ‘Like’ the page before you can view the full application. It was decided that we would have a ‘Like’ button inside the page, which means I needed to manually do the refresh/redirect after they click Like to show the proper application.

I’m using this code to achieve this:

<div id="fb-root"></div>
<script>
    (function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=xxxx";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>
<script>
    window.fbAsyncInit = function() {

        // Javascript SDK Settings
        FB.init({
            appId  : 'xxx',
            status : true, // check login status
            channelUrl : 'https://www.xxx.com/assets/apps/channel.html', // Channel File
            cookie : true, // enable cookies to allow the server to access the session
            xfbml  : true  // parse XFBML
        });

        // Automatically increase height of our canvas.
        FB.Canvas.setAutoGrow();

        // When they click the like button within our app refresh the page and take them to our app.
        FB.Event.subscribe('edge.create', function(href, widget) {
            window.top.location = '//www.facebook.com/xxx/app_xxx';
        });

    };
</script>

<div id="like"><div class="fb-like" data-href="xxx" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div></div>
<img src="/assets/apps/lyc/img/nolike.jpg" />

To quickly walk through it there’s the javascript sdk being included for the like button and the functionality I need. Then I set the SDK Settings, automatically grow the length of the iframe and finally have my click event functionality where if the button is clicked I take them to the app page.

This works correctly everywhere except in IE7. When you click ‘Like’ in IE7 it simply sits there and doesn’t run the redirect. I can’t see any errors though. As I said all other browsers do the redirect.

I’ve been stuck on this for quite a while so any help would be greatly appreciated.

Cheers

  • 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-06-01T10:32:45+00:00Added an answer on June 1, 2026 at 10:32 am

    I suspect that IE7 is blocking your JavaScript redirect because it doesn’t consider clicking inside of an iFrame (the Like button) as valid user interaction. IOW, this is a redirect-blocking mechanism of the web-browser. To confirm that this is true please change the following code:

    FB.Event.subscribe('edge.create', function(href, widget) {
                alert('You clicked like!');
                window.top.location = '//www.facebook.com/xxx/app_xxx';
    });
    

    Does the alert show up? If it does then that confirms that the event is being trapped, but the browser is preventing the redirect. A good workaround is to display a “continue” button in addition to attempting the redirect just in case the redirect doesn’t work in certain browsers.

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

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I would like to run a str_replace or preg_replace which looks for certain words
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.