1. #1 by R0meo - August 21st, 2010 at 06:40

    How to NOT show facebook fan page WALL and any other info of the fan page while user is non-fan

    any suggestions?

    • #2 by timware - August 21st, 2010 at 07:28

      No way that I'm aware of. How would someone become a fan if they couldn't see anything on your Page? No, you can't hide the Wall tab by any means.

  2. #3 by Razu Kc - August 27th, 2010 at 13:45

    Do you know some way to hide the entire left portion of the fan page? Those include people who like the page, other info, links, notes etc. I wan to want to add a Static FBML page, of greater width and its only possible if i could somehow not show the left portion.

  3. #5 by Pooja Gandhi - August 30th, 2010 at 10:59

    Is it possible to hide the photos in albums from non fans

  4. #6 by Carolyn K. - August 30th, 2010 at 12:00

    Works like a charm, thank you so much! We had an image to display to fans only, and some text for non-fans encouraging them like us. Thank you for the directions, they were perfect :)

  5. #7 by Jeremy Lockhart - August 30th, 2010 at 15:43

    Still having issues using CSS to position the 2 div's absolutely. I had to resort to using a background image on the div for non-fan content and then putting my fan content over top of it covering it.

  6. #8 by D Webb - August 30th, 2010 at 18:07

    Jeremy - thanks for the tip. I was getting the divs to work correctly in FF but IE was still creating the empty space at the top of the page. I used Jeremy's suggestion of a background image, which worked fine but disallowed the use of any complex content.

    • #9 by timware - August 31st, 2010 at 01:24

      The key thing in using absolute positioning to account for the fan-only content space is to MAKE SURE that the DIV that contains the absolute-positioned DIV is set to "position: relative". Then the absolute-positioned DIV will be positioned relative to that containing DIV using the top/bottom and left/right parameters.

  7. #10 by Katie Bolson - September 1st, 2010 at 13:14

    Here's the code I'm trying to use for having non-fans see one image, and fans see another image. Problem is, when I have a 3rd party person(non admin) try it, they see both the non-fan image and the image for just fans. Is there a way to make it so that the person sees 1 image before they are a fan, and then just the 2nd image after? I've tried a bunch of variations but I feel like I'm missing something!

    Thanks!!

    Here's my code


    <img width="520" src="http://farm5.static.flickr.com/4102/4948756057_2486809f4b_z.jpg">
    <fb:visible-to-connection>
    <img width="520" src="http://farm5.static.flickr.com/4149/4948756177_bceed2267c_b.jpg">
    </fb:visible-to-connection>

    • #11 by timware - September 1st, 2010 at 14:14

      Katie, You should read this tutorial more closely. It should be obvious what you're doing wrong here.

  8. #12 by Matthew Martindale - September 1st, 2010 at 20:35

    This worked for me and might be a simpler route. Thanks to this article, my mind was put on the right track to come up with my version of the solution.


    <fb:visible-to-connection>
    <style type="text/css">.fancontent{display:block}</style>
    <fb:else>
    <style type="text/css">.fancontent{display:none}</style>
    </fb:else>
    </fb:visible-to-connection>

    • #13 by Matthew Martindale - September 1st, 2010 at 20:37

      This code is, of course, followed by the actual content:


      <div class="fancontent">Imagine content here...</div>

      • #14 by timware - September 2nd, 2010 at 09:27

        Matthew: Can you provide the URL where this worked, as well as the browser and platform (Mac or Windows)? I couldn't get your "solution" to work in FF or Safari on Mac, or IE 8 on the PC, at which point I stopped testing.

        Even if it did work somewhere, I would not advise using inlined <style> tags at all on Static FBML tabs.

        A slight modification to your approach that would work is just inlining the styles within the HTML tags: <div style="display:block">, for example.

  9. #15 by Matthew Martindale - September 2nd, 2010 at 00:35

    My apologies. My previous code stopped working and I am not sure why. However, I did find another solution with less code:


    <div><!--fan content open tag-->
    <fb:visible-to-connection>
    - fan content here -
    </div><!--fan content close tag-->
    </fb:visible-to-connection>

    I would say it's more of a hack than a standard practice. However, it works and at least it is Facebook and not your site that is considered "non-standard". :p

    • #16 by timware - September 2nd, 2010 at 09:33

      What is your logic here? You open a DIV, then open an FBML tag, then close the DIV before closing the FBML tag. If this works on some browser, I think it's a fluke.

      I appreciate that your trying to really minimize the code for the fans only content method, but my approach is probably as minimal as you'll get while still getting it to display properly over all browsers and platforms.

      Also, there's no <fb:else> tags, so I guess you'd just have some content for fans and no content for non-fans?

      • #17 by Matthew Martindale - September 2nd, 2010 at 13:40

        I think the bigger problem is Facebook not making a simple function easy to work with. No matter how you get it to work for you, it's not exactly ideal.

        Your approach is definitely working, which is more than I can say after discovering this morning that my approach had stopped working (some of my issues might be due to caching, however). The logic behind the second solution I provided was someone else's, and I can't find the blog URL (sorry). At the time, it worked in all browsers, and it seemed to work for many others.

        From what I have discovered, even is inconsistent.

  10. #18 by selina - September 2nd, 2010 at 04:54

    how do i hide the 'non-fans' part, after someone likes my page.

    • #19 by timware - September 2nd, 2010 at 09:35

      Selina, You should get in the habit of reading tutorials closely before posting questions. As it says in the red NOTE near the beginning of this article, if you're logged into Facebook as a page admin while viewing the tab, you're going to see both fans and non-fans content.

  11. #20 by Alex Holigores - September 4th, 2010 at 16:51

    Thanks for the help with this, it's working great! Does anyone have any idea how to add comments to the "visible-to-connection" page only, and not fb:else?

    Thanks!


(will not be published)

Be sure to wrap all code in <code></code> tags.

Submit Comment