In this post, Facebook like button that redirects?, I saw a code to redirect after doing a Facebook "like".

I pasted in there, but I can't figure out how to put the link I want to redirect to?

  • I see you did not comment on Ottos answer, perhaps you should have asked for clarification rather than starting a whole new question
    – Tom J Nowell
    Mar 4, 2013 at 14:36
  • @TomJNowell New users cannot comment.
    – user26607
    Mar 4, 2013 at 14:39

1 Answer 1


If you got everything else running and it is really just the redirect that you can't manage, then replace the 'alert' lines in Ottos example with window.location = "http://www.your-domain.tld/".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.