Facebook "like" Button for Vbulletin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reolien01
    New Member
    • Feb 2006
    • 6

    [Forum] Facebook "like" Button for Vbulletin

    Code:
    <iframe src="http://www.facebook.com/plugins/like.php?href=(web_site)&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=dark" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
    This is the code, my question is, how do I put this in the postbit legacy and have it update the current url.

    With this code, every time a user clicks, it links to only one address labeled above as (web_site).

    It would be much appreciated for a hand on this.
  • Reolien01
    New Member
    • Feb 2006
    • 6

    #2
    Code:
    <iframe src="http://www.facebook.com/plugins/like.php?href=http://(web_site)$_SERVER[SCRIPT_NAME]?$_SERVER[QUERY_STRING]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action=like&amp;colorscheme=light" 
     scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>

    That does it by Url in browser in postbit_legacy. Now I just need to find out how to add postid

    Comment

    • M@tt
      Senior Member
      • Oct 2009
      • 112
      • 3.8.x

      #3
      Can I ask what the idea is behind this? Will it then show up a like on your facebook profile and link back to the thread for example?
      sigpic

      Comment

      • Reolien01
        New Member
        • Feb 2006
        • 6

        #4
        Yes, anyone who presses the "like" button.

        Code:
        <iframe src="http://www.facebook.com/plugins/like.php?href=http://{website}/showthread.php$session[sessionurl]?p=$post[postid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action=like&amp;colorscheme=light" 
         scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>
        This works correctly, but I would like the URL preview text to be the same name as the thread.
        Last edited by Reolien01; Thu 22 Apr '10, 2:45pm.

        Comment

        • chink
          New Member
          • Jul 2003
          • 23

          #5
          Hi, Ive been trying to get the same thing working yesterday and today! Although I can't even get as far as you...

          when I add the exact same code you have... click like I just get 'error' in red next to it, I have tried setting up my website application ID with facebook and getting the javascript for that in the header too to see if it would help.. but nothing?

          any ideas?

          here is my code


          Code:
          <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.streetrace.co.uk/forum/$session[sessionurl]?p=$post[postid]&amp;layout=button_count&amp;show_faces=true&amp;width=&amp;action=like&amp;colorscheme=light" 
           scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>
          Last edited by chink; Thu 22 Apr '10, 2:42am.

          Comment

          • chink
            New Member
            • Jul 2003
            • 23

            #6
            I have even tried pasting the URL into facebooks generator which presents this...

            Code:
            <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.streetrace.co.uk%2Fforum%2Fshowthread.php%24session%5Bsessionurl%5D%3Fp%3D%24post%5Bpostid%5D&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
            still no joy?

            Comment

            • Reolien01
              New Member
              • Feb 2006
              • 6

              #7
              Do you have vbseo? If so try:


              <iframe src="http://www.facebook.com/plugins/like.php?href=http://(DOMAIN)$_SERVER[VBSEO_URI]?p=$post[postid]&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=l ight"
              scrolling="no" frameborder="0" allowTransparency="true" title="hihi" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>

              Comment

              • clubplanet
                Member
                • Feb 2001
                • 59

                #8
                Originally posted by Reolien01
                Do you have vbseo? If so try:

                <iframe src="http://www.facebook.com/plugins/like.php?href=http://(DOMAIN)$_SERVER[VBSEO_URI]?p=$post[postid]&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=l ight"
                scrolling="no" frameborder="0" allowTransparency="true" title="hihi" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>
                Thanks, this worked perfectly for me!
                -DaVe

                Comment

                • chink
                  New Member
                  • Jul 2003
                  • 23

                  #9
                  Thanks, but I dont have vbseo. I am using Vbulletin 3.5.0

                  can't work out why it wouldnt be working if yours is? and im using exact same code

                  Comment

                  • Coop1979
                    New Member
                    • Sep 2006
                    • 12
                    • 3.8.x

                    #10
                    Originally posted by clubplanet
                    Thanks, this worked perfectly for me!
                    Odd, I'm still getting an error when I try to "Like" a thread using this code.

                    Comment

                    • i156
                      Senior Member
                      • Oct 2007
                      • 104
                      • 4.1.x

                      #11
                      This is the first thing I was looking for this morning and the code works perfectly on my site.

                      Comment

                      • bogley
                        Member
                        • Dec 2009
                        • 95
                        • 3.8.x

                        #12
                        Originally posted by clubplanet
                        Thanks, this worked perfectly for me!
                        So are you able to put a Like button on each thread? And when published to the facebook wall, does it show the thread title, or just the name of the forum?
                        Last edited by bogley; Thu 22 Apr '10, 8:51am.

                        Comment

                        • Rodney B
                          Member
                          • Jan 2005
                          • 59
                          • 3.7.x

                          #13
                          Originally posted by Reolien01
                          Do you have vbseo? If so try:


                          <iframe src="http://www.facebook.com/plugins/like.php?href=http://(DOMAIN)$_SERVER[VBSEO_URI]?p=$post[postid]&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=l ight"
                          scrolling="no" frameborder="0" allowTransparency="true" title="hihi" style="border:none; overflow:hidden; width:100px; height:20px"></iframe>

                          Is there anything you need to change in this code to get it to work? Like change DOMAIN to your domain?

                          Comment

                          • Reolien01
                            New Member
                            • Feb 2006
                            • 6

                            #14
                            Originally posted by Rodney B
                            change DOMAIN to your domain?
                            Yes

                            Comment

                            • Rodney B
                              Member
                              • Jan 2005
                              • 59
                              • 3.7.x

                              #15
                              Originally posted by bogley
                              So are you able to put a Like button on each thread? And when published to the facebook wall, does it show the thread title, or just the name of the forum?
                              Yes, the facebook status shows "Name likes THREAD NAME on FORUMNAME" - both the thread name and forum name are directly hyperlinked.

                              When I put it on postbit legacy, it showed on every post, but even if you liked post number 11 in the thread, it counted the "thread" as the liked item instead of the individual post.

                              Comment

                              Related Topics

                              Collapse

                              Working...