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

Is there a way to tie your built in Facebook Like button to your Facebook Fan Page?

Discussion in 'XenForo Questions and Support' started by Rho Delta, Aug 20, 2013.

  1. Rho Delta

    Rho Delta Well-Known Member

    I'd like when people click like on my site to automatically like my Fan page. This would basically subscribe them to my facebook posts that will direct traffic back to my site. Is this possible?
     
  2. Mike

    Mike XenForo Developer Staff Member

    The short answer is no.
     
  3. akia

    akia Well-Known Member

    Change the URL in the Share this Page template.

    That's what I've done, so if they click like they are liking the facebook page.
     
  4. Rho Delta

    Rho Delta Well-Known Member

    Can you paste an example code? I'm not seeing where you would have made this change in sidebar_share_page
     
  5. akia

    akia Well-Known Member

    <xen:if is="{$xenOptions.facebookLike}">
    <div class="facebookLike shareControl">
    <xen:container var="$facebookSdk">1</xen:container>
    <fb:like href="{$url}" show_faces="true" width="400" action="{$xenOptions.facebookLikeAction}" font="trebuchet ms" colorscheme="@fbColorScheme"></fb:like>
     
  6. akia

    akia Well-Known Member

    Change the {$url} to your facebook page url.
     
  7. FredC

    FredC Well-Known Member

    Not that i tested it but the solution seemed easy enough.. So there must be more to your short answer then just no.. Would you mind elaborating? would this be some type of Facebook TOS violation ?
     
  8. Rho Delta

    Rho Delta Well-Known Member

    Yeah is @akia 's code allowed with Facebook?
     
  9. Mike

    Mike XenForo Developer Staff Member

    Tieing in a like of content and changing the like button to point to your Facebook page are different. There's no way to specifically like this thread for example, using the button below, while simultaneously giving the XF Facebook page a like. You could change the URL to the Facebook page (as mentioned here: https://developers.facebook.com/docs/reference/plugins/like/ and in this thread) but then you're liking that, rather than the page that you're on.
     
    FredC likes this.
  10. FredC

    FredC Well-Known Member

    haha well that button has never worked properly for me.. It always produced some odd off the wall abstract url that pointed to nothing.. So making this modification would actually give some functionality to the like buttons on my forum where there was none before.... (it was actually quite counter productive in the past..)
     
  11. Chi Bearhawks

    Chi Bearhawks Member

    I would think most people would prefer the like to be for their facebook page in general, not the specific site page/thread.
     
  12. Rho Delta

    Rho Delta Well-Known Member

    I would like to keep thread likes how they are, I really just want to change the like button on the front page to like my fan page. Liking your homepage as it is does nothing really beneficial. If I use his code will it only change the front page?
     
  13. akia

    akia Well-Known Member

    Yes unless you change it elsewhere.
     
  14. Rho Delta

    Rho Delta Well-Known Member

    Awesome! Worked like a charm!
     

Share This Page