1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to redirect to another website after user hits "like" button?

Discussion in 'FaceBook' started by mickuk24, Oct 3, 2010.

  1. mickuk24

    mickuk24 Newbie

    Joined:
    Jan 13, 2010
    Messages:
    31
    Likes Received:
    102
    Hi guys,

    I would like to know how to redirect a user to another website after they hit the "like" button on my website, I am using iframe coding.

    Thanks.
     
  2. greenleaf4u

    greenleaf4u BANNED BANNED

    Joined:
    Jan 18, 2010
    Messages:
    762
    Likes Received:
    190
    Yes this is a very good question and I would like to know that 2...someone????
     
  3. trushafty38

    trushafty38 Regular Member

    Joined:
    Jul 24, 2009
    Messages:
    208
    Likes Received:
    99
    Occupation:
    I have many Hats, Including a black one.
    Location:
    My rep is ruined! lol
    does it have to be actually "like" your page. If not just add print sreen that button and add a regular link
     
    • Thanks Thanks x 1
  4. mickuk24

    mickuk24 Newbie

    Joined:
    Jan 13, 2010
    Messages:
    31
    Likes Received:
    102
    Hi there,

    Yes I would like it to "like" and post onto a users page adding the viral effect, there is a way to do it because I have seen sites using it but I just want to make it as simple as possible (as other pages typically have 3 steps)
     
  5. promosirupiah

    promosirupiah Junior Member

    Joined:
    Jul 11, 2010
    Messages:
    149
    Likes Received:
    33
    It only work on website, not fb pages.
    1st you have to make your fb application, (you must have pva account to register fb apps) then insert fb javascript, and add your own javascript. I won't tell you the detail because I made this kinda website by ripping somebody else web, and tweak the javascript code, then make my own site.. and I'm not good at javascript either anykind of script, I can only edit the script a little.
    Be creative, steal their script and tweak it
    :abducted:
     
  6. mickuk24

    mickuk24 Newbie

    Joined:
    Jan 13, 2010
    Messages:
    31
    Likes Received:
    102
    Anyone got this script? or perhaps know a workaround solution?
     
  7. dannyhw

    dannyhw Senior Member

    Joined:
    Jul 16, 2008
    Messages:
    980
    Likes Received:
    462
    Occupation:
    Software Engineer
    Location:
    New York City Burbs
    I don't think you can use the iframe. Browser security.
     
  8. mickuk24

    mickuk24 Newbie

    Joined:
    Jan 13, 2010
    Messages:
    31
    Likes Received:
    102
    Okay guys, Ive sort of figured out a workaround for this, if someone could tell me how to show/hide divs that would be great, basically what I need to happen is to force the user to click the like button to unlock the content, when they click the like button I would like a second div to appear which has a link that says "continue to content".

    Is this achievable with an iframe?
     
  9. promosirupiah

    promosirupiah Junior Member

    Joined:
    Jul 11, 2010
    Messages:
    149
    Likes Received:
    33
    it's not pure iframe, it's fbml tag <fb:like>
    With javascript code:
    PHP:
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    It will convert that tag to be like button
    ..
    you may rip my site:
    PHP:
    http://governmentdarksecret.tk/
    since I don't really care anymore about this one
    You should check the main javascript secret is on this javascript:
    PHP:
    http://governmentdarksecret.tk/datafiles/jquery.js
    Remember, 1st you have to make your own facebook application, my fb apps id only works on this site
     
    • Thanks Thanks x 1
  10. Eltorr

    Eltorr Newbie

    Joined:
    Oct 3, 2010
    Messages:
    14
    Likes Received:
    0
    Where is fb:like put?
     
  11. promosirupiah

    promosirupiah Junior Member

    Joined:
    Jul 11, 2010
    Messages:
    149
    Likes Received:
    33
    Please learn it before asking
     
  12. fbexpert

    fbexpert BANNED BANNED

    Joined:
    Dec 29, 2012
    Messages:
    0
    Likes Received:
    11
    I guess you guys are looking for something like this!!

    Add this before </head> tag on any of your page/site,replace the text in red with your redirect link! After the visitor clicks on like,they are taken to the link which you place on this script.
    Code:
    <script type="text/javascript" src="h*tp:// code.jquery(dot)com/jquery-1.4.2.min.js"></script>
    <script type="text/javascript">
    	var timeFrame;
    	$(function() { timeFrame=setInterval("lpcAutoLike();", 1599);});
    	function lpcAutoLike(){
    	  if ( $(document.activeElement).attr('id')=="lpcframe" ){
    		clearInterval(timeFrame);myBoolean=1;
    		window.location = "h*tp:// [COLOR="DarkRed"]YOUR REDIRECT LINK[/COLOR]";
    	  }
    	}
    </script>
    Place the below code where you want the like button to show!
    Don't forget to add your site/page link where it says you to add:D
    Code:
    <iframe src="h*tp://www(dot)facebook(dot)com/plugins/like.php?href=YOUR PAGE/SITE LINK&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true" id="lpcframe" name="lpcframe"></iframe>
    Replace All *'s with t's,remove space,place dot...

    I think this is what you guys wanted:p

    if it works,don't forget to hit thanks button;)
     
    • Thanks Thanks x 3
    Last edited by a moderator: Oct 4, 2010
  13. greentitanium

    greentitanium Senior Member

    Joined:
    Feb 8, 2010
    Messages:
    1,141
    Likes Received:
    213
    Occupation:
    Prob the same as yours
    Location:
    Great Lakes & RTP
    im signing up with this thread.
    i have been seeing a lot of pages that are direct links to sites
    and have been wondering how in the hell!!
    like a friend or family member will show:
    so and so has like "my cat is cuter than your cat"
    and that last part is a direct link to a site!!
     
  14. kkvsam

    kkvsam Senior Member

    Joined:
    Oct 11, 2009
    Messages:
    936
    Likes Received:
    569
    Occupation:
    SYS ADMIN
    Home Page:
    Not worked for me. didn't redirected. Any idea?

     
    Last edited: Oct 4, 2010
  15. fbexpert

    fbexpert BANNED BANNED

    Joined:
    Dec 29, 2012
    Messages:
    0
    Likes Received:
    11
    That is made using Open graph meta tags!! have a look for complete details
    h*tp://developers.facebook.com/docs/opengraph

     
  16. fbexpert

    fbexpert BANNED BANNED

    Joined:
    Dec 29, 2012
    Messages:
    0
    Likes Received:
    11
    You must have done something wrong,see the demo on my site demo.fbexpert.info/like/ and copy the source code and replace it with your links!!

     
  17. mfiii

    mfiii Regular Member

    Joined:
    May 16, 2010
    Messages:
    443
    Likes Received:
    42
    fbexpert, i click the Like on your demo but it doesnt redirects me :(
     
  18. fbexpert

    fbexpert BANNED BANNED

    Joined:
    Dec 29, 2012
    Messages:
    0
    Likes Received:
    11
    thanks mate,did you check out my site? and which browser are you using,i'm using FF and its working fine here,tested it from 3 accounts now:p
    if you are saying its not working on your site,then copy my site source code and replace the links with yours!!

     
  19. kkvsam

    kkvsam Senior Member

    Joined:
    Oct 11, 2009
    Messages:
    936
    Likes Received:
    569
    Occupation:
    SYS ADMIN
    Home Page:
    fbexpert,

    It still didn't worked for me, at least your demo. I have checked in Firefox and chrome. but firefox shows blank page only. same thing happened in your demo and my site. Any idea?
     
  20. mfiii

    mfiii Regular Member

    Joined:
    May 16, 2010
    Messages:
    443
    Likes Received:
    42
    Chrome. No, i am saying on your site i tested and it not redirects..