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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:18:38+00:00 2026-05-28T13:18:38+00:00

I am trying to redirect to an URL if the Facebook Like button has

  • 0

I am trying to redirect to an URL if the Facebook Like button has been pressed, but it doesn’t work, and results having an error in the source view saying “FB is not defined”

Here’s my redirect code:

    FB.Event.subscribe('edge.create',
    function(response) {
        location.href = 'censored';
    }
);

and here’s the FB like button

    <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_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<center><fb:like href="http://www.siriforall.net" send="true" width="450" show_faces="false"></fb:like></center>

Anyone help please? I am a noob sorry.

  • 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-28T13:18:39+00:00Added an answer on May 28, 2026 at 1:18 pm

    Ensure your FB.Event is inside of the fbAsyncInit function so you assured that the JS SDK framework has been loaded into the browser. Also be sure to call FB.init() first before calling FB.Event.

    window.fbAsyncInit=function() {
       // YOUR CODE HERE THAT USES FB.anythin
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to change the redirect URL for Facebook login on my site. This
I am trying to get access_token via coldfusion. But when I write <cflocation url=https://graph.facebook.com/oauth/authorize?client_id=12345678&redirect_uri=http://xyz.com/test/new/
I'm trying to create facebook login, Login button on my site redirect me to
I am trying to redirect a page reading the url from the config file.
Im trying to redirect pages such as: /selected-work/project-name-1 /selected-work/project-name-2 /selected-work/project-name-3 /selected-work/category/category-name to just /work/
I've been trying to redirect my subdomain buynow.mydomain.info to the product link which is
We've been trying to redirect from one action to another, hoping that data would
I am trying to redirect ALL requests for mydomain.com whether they are something like:
I'm trying to write a Greasemonkey script for Facebook and having some trouble with
This is the FB Url I am trying to access. https://graph.facebook.com/oauth/authorize?client_id=694aa71aed60fb9d79aae04b81ff27c8&redirect_uri=http://localhost/TestConnect/Facebook.aspx&scope=email,user_about_me,user_interests,user_likes,user_location,user_notes,user_education_hi It says The

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.