Facebook Click Like To Access Content > DOWNLOAD (Mirror #1)
5a02188284 Issues with FB.login and its fixes using FB.getLoginStatus. And we are going to show you how in this tutorial. .. You will get a notification saying your new tab has been created. The ‘Page Source’ is what your fan will see. Fill up the external page with the URL you want to redirect your fans to. Here is my iFrame HTML when the user has not liked the page: body { width:520px; margin:0; padding:0; border:0; font-family: verdana; background:url(repeat.png) repeat; margin-bottom:10px; } p, h1 {width:450px; margin-left:50px; color:#FFF;} p {font-size:11px;} And, if the user has liked the page: body { width:520px; margin:0; padding:0; border:0; font-family: verdana; background:url(repeat.png) repeat; margin-bottom:10px; } p, h1 {width:450px; margin-left:50px; color:#FFF;} p {font-size:11px;} You liked this page javascript jquery ruby-on-rails ruby-on-rails-3 facebook shareimprove this question edited Jun 10 '11 at 18:19 Christian Fazzini 11.5k1484181 asked Jun 5 '11 at 22:54 Rails beginner 5,40125105225 Can you use the FB JS API ? –dwarfy Jun 9 '11 at 15:51 Yes i know th FB JS SDK - But i dont know how to use it –Rails beginner Jun 9 '11 at 21:05 2 other questions before I give it a shot : Is it really sensitive information ? Because one approach involve showing one div with js if the user like the page and showing another div if the user don't like the page (both divs being hidden in the page at start) so somebody could unhide them with firebug or something else and see your content. To start, go to the Woobox website and click on the signup button. What’s your comment? Do you think Like-gating still works? You might also like Discord Review: Chat & Social App for Hardcore GamersAshutosh KS How to Read Deleted Reddit CommentsKarrar Haider 6 Hashtag Campaign Tracking Tools for Social Media Marketers - Best OfJoydeep Bhattacharya 5 Ways to Download Instagram VideosKarrar Haider Free Profile GUI PSDs for Social Networking SitesJake Rocheleau Hongkiat.com (HKDC). Hongkiat.com Main Menu Design / Dev Technology Inspiration Social Commerce All Deals Search Hongkiat for: Reveal Search Form Reveal Off-canvas Navigation 3 Facebook Like Button Tricks You May Not Know By Mustaza Mustafa in Social Media The Facebook ‘Like’ button is a powerful tool you can utilize to increase the fan base for your brands, companies and products. You will be redirected to the page where you can start installing your Woobox application. } }); } else { // user is not logged in } }); }); So what what does it do ? First it logins to FB (if you already have the USER ID, and you are sure your user is already logged in facebook, you can bypass the login stuff and replace response.session.uid with YOURUSERID (from your rails app for example) After that it makes a FQL query on the pagefan table, and the meaning is that if the user is a fan of the page, it returns the user id and otherwise it returns an empty array, after that and depending on the results its show a div or the other. Our next conference will be held: April 23-25, 2018: San Jose Attend MarTech - Click Here Learn More About Our MarTech Events March 13-15, 2018: SMX West June 11-13, 2018: SMX Advanced Attend SMX - Click Here Learn More About Our SMX Events White Papers From Finger to Foot TrafficHow to Launch a Successful Refer-a-Friend ProgramSelling to the Information-Driven BusinessElevate Your B2B Marketing: A Guide to Intelligent ABM7 B2B Marketing Strategies You Need to Know About See More Whitepapers Webinars Advanced Ad Targeting Strategies for AdWords, Facebook and DisplayHoliday Retail Search Strategies 2017: What worked, what didntPress Play on Video Advertising: Tips for success in 2018 See More Webinars Research Reports Content Marketing Tools B2B Predictive Marketing Analytics Platforms Social Media Management Software Call Analytics Platforms Paid Media Campaign Management Platforms B2B Marketing Automation Platforms See More Research Sign up for our daily newsletter Follow Us 2018 Third Door Media, Inc. rev2018.1.9.28319 . Here is the code posted above with changes which worked for me. All Rights Reserved. You can read about it marismith.com/iframes-facebook-app-fan-gate-wildfire here, just look down on the site. alert('please login'); } }); FB.Event.subscribe('edge.create', function(response) { alert('You liked the URL: ' + response); $("#containerlike").show(); } shareimprove this answer answered Nov 13 '12 at 15:16 Sofia Khwaja 384416 Thanks Sofia! this should move to the top as it works with the current FB API. –Modatheus Jun 6 '11 at 10:30 It doesnt work in a iframe app –dwarfy Jun 11 '11 at 7:20 add a comment protected by Communityf Mar 31 '12 at 0:15 Thank you for your interest in this question. #3. Non-fans will see this content. The link to download will only appear after a person click ‘Like’. Stack Overflow Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile Stack Overflow Business Talent Ads Enterprise Company About Press Work Here Legal Privacy Policy Contact Us Stack Exchange Network Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Software Engineering Unix & Linux Ask Different (Apple) WordPress Development Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica Salesforce ExpressionEngine Answers Stack Overflow em Portugus Blender Network Engineering Cryptography Code Review Magento Software Recommendations Signal Processing Emacs Raspberry Pi Stack Overflow Programming Puzzles & Code Golf Stack Overflow en espaol Ethereum Data Science Arduino Bitcoin more (26) Photography Science Fiction & Fantasy Graphic Design Movies & TV Music: Practice & Theory Worldbuilding Seasoned Advice (cooking) Home Improvement Personal Finance & Money Academia Law more (16) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity English Language Learners Japanese Language Arqade (gaming) Bicycles Role-playing Games Anime & Manga Puzzling Motor Vehicle Maintenance & Repair more (32) MathOverflow Mathematics Cross Validated (stats) Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more (10) Meta Stack Exchange Stack Apps API Data Area 51 Blog Facebook Twitter LinkedIn site design / logo 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. more stack exchange communities company blog Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Log In Sign Up . For the document.ready, you could wrap your code in a function and use body onload="yourfunction" or something more complicated like here : Javascript - How to detect if document has loaded (IE 7/Firefox 3) so that we replace document ready. There are actually three actions you can program your ‘Like’ button to do. I use RoR, therefore I can't use the Facebook PhP SDK. Creating ‘Like to download’ action ‘Like to download’ also function like a ‘gate’ before ‘download’ can be done. –Terri Ann Jan 13 '12 at 19:11 show 4 more comments up vote 5 down vote Here's a working example, which is a fork of this answer: $(document).ready(function(){ FB.login(function(response) { if (response.status == 'connected') { var userid = response.authResponse.userID; var pageid = "40796308305"; // coca cola page var fqlquery = "SELECT uid FROM pagefan WHERE pageid="+pageid+" and uid="+userid; FB.api({ method: 'fql.query', query: fqlquery }, function(response){ if (response[0]) { $("#containerlike").show(); } else { $("#containernotlike").show(); } } ); } else { // user is not logged in } }); }); I used the FB.api method (JavaScript SDK), instead of FB.Data.query, which is deprecated. Uh-oh!It could be you, or it could be us, but there's no page here.Search. Cheers UPDATE 2 As stated by somebody, jQuery is required for the javascript version to work BUT you could easily remove it (it's only used for the document.ready and show/hide). How do I react to a post or comment?Liking tells your friends that you enjoyed their post or comment, whereas reacting allows you to specify your response. As part of the marketing strategy for many pages, this Like button is used as a ‘gate’ before any potential customer gets to see detailed info or perform downloads. Would you like to answer one of these unanswered questions instead? Not the answer you're looking for? Browse other questions tagged javascript jquery ruby-on-rails ruby-on-rails-3 facebook or ask your own question