The new Facebook like button

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
Locked
User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: The new Facebook like button

Post by beggers »

Thanks very much, popescucv. It does appear to be working now. Apparently when you first click on it, the actual URL is posted on Facebook. Then the Facebook bot checks out the link and grabs the title, replacing it on your FB page (I can see the bot in my Who Is Online). At least, that's my guess as to what's happening.

The only problem I have at the moment is that it's almost invisible on a dark theme so I'll have to work on that.

popescucv, you've been really helpful in this topic. Thanks again.
User avatar
popescucv
Registered User
Posts: 43
Joined: Sat Nov 15, 2008 7:35 am

Re: The new Facebook like button

Post by popescucv »

I'm glad I've been helpful !
Good luck and best regards.
User avatar
stealthy62
Registered User
Posts: 20
Joined: Sun Oct 17, 2010 3:31 am

Re: The new Facebook like button

Post by stealthy62 »

so i got everything working, only issue is a huge blank spot in between it and the post:

https://community.timesoflegend.com/vie ... p?f=4&t=63


any clue what my problem is? heres what the code looks like:

Code: Select all

<!-- IF CAN_FACEBOOK -->
<iframe src="http://www.facebook.com/plugins/like.php?href={BOARD_URL}viewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
<fb:like href="{BOARD_URL}viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
<!-- ENDIF -->
Last edited by stealthy62 on Fri Dec 17, 2010 8:26 am, edited 1 time in total.
User avatar
popescucv
Registered User
Posts: 43
Joined: Sat Nov 15, 2008 7:35 am

Re: The new Facebook like button

Post by popescucv »

This part is not complete and I think that you can delete it < <iframe src="http://www.facebook.com/plugins/like.ph ... f%3D{S_FOR$ >
I think you need to specify the width and high for Facebook link < show_faces="false" width="450" height:40px >
I think it sould look like this:

Code: Select all

<fb:like href="{BOARD_URL}viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="false" width="450"  height:40px  colorscheme="light">
You can change show_faces=true (the tab high will increase) and of course the width and high with yours value.
User avatar
stealthy62
Registered User
Posts: 20
Joined: Sun Oct 17, 2010 3:31 am

Re: The new Facebook like button

Post by stealthy62 »

Code: Select all

<iframe src="http://www.facebook.com/plugins/like.php?href={BOARD_URL}viewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:35px"></iframe>
<fb:like href="{BOARD_URL}viewtopic.php?f={S_FORUM_ID}&t={S_TOPIC_ID}" layout="standard" show_faces="false" width="450" action="like" colorscheme="light" />
seemed to do the trick, thanks :)
crossflow
Registered User
Posts: 14
Joined: Tue Dec 28, 2010 1:57 pm

Re: The new Facebook like button

Post by crossflow »

Got it all working perfectly thanks, nice mod

Have it at post and thread level and no issues at all, works great posting to FB

Good job
MaLeKo
Registered User
Posts: 210
Joined: Tue May 06, 2008 3:32 am

Re: The new Facebook like button

Post by MaLeKo »

Why you all using the iframe code? The xfbml code is much simpler and better imo

Code: Select all

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like show_faces="false" width="450"></fb:like>
http://developers.facebook.com/docs/ref ... ugins/like
dr16049
Registered User
Posts: 31
Joined: Tue Mar 25, 2008 12:45 am

Re: The new Facebook like button

Post by dr16049 »

Thanks very much!! After multiple errors I did get it. Had to adjust the path to my forum is what the problem was. Exactly what I wanted!!
V6wall
Registered User
Posts: 1
Joined: Wed Jan 12, 2011 2:15 pm

Re: The new Facebook like button

Post by V6wall »

Hi everybody,

I have a problem with this ''Like" button (with the Facebook comment box the same problem as well). So inside the toppic, under every post I would like to have a like button (or comment box). I have the "like" script, it apears on the site, but... The main problem is, that when you press on one of the like buttons on the forum, it activates all of them ;( in entire website. So does enyone know, how to make this code unique in every post, and every page?

here are the scripts I was trying to use:


Like button:

<script src="http://connect.facebook.net/en_US/all.j ... t><fb:like href="{URL to Like}" show_faces="true" width="450"></fb:like>


Comment Box:

<div id="fb-root"></div><script src="{Unique ID (in facebook)}&amp;xfbml=1"></script><fb:comments numposts="10" width="425" publish_feed="true"></fb:comments>


the way I use it is this:

in CP -- Posting -- BBCodes -- Add a new BBCode -- HTML replacement ---------------- in this way I made a new "Like" button in a posting pannel and using it.

Image

Image

Image

if atleast one of those codes would function as it should be, I would be sooooooooooo happy :)))
can anyone say, what I do wrong, or maybe is smth missing there?


here are an exemple2: http://v6wall.com/viewtopic.php?f=1797&t=2828

http://v6wall.com/viewtopic.php?f=1797&t=2829


http://v6wall.com/viewforum.php?f=1797
dr16049
Registered User
Posts: 31
Joined: Tue Mar 25, 2008 12:45 am

Re: The new Facebook like button

Post by dr16049 »

As I said in a previous post this is working great for me. My problem is when someone likes it, on their fb page it posts a random image from my page that is in a sidebar with it. And not the same one all the time. It picks different ones. Is there a way to disable this or point it to a specific picture?

Hope some one can help
plasmino
Registered User
Posts: 261
Joined: Sat Jul 25, 2009 11:12 am

Re: The new Facebook like button

Post by plasmino »

dr16049 wrote:As I said in a previous post this is working great for me. My problem is when someone likes it, on their fb page it posts a random image from my page that is in a sidebar with it. And not the same one all the time. It picks different ones. Is there a way to disable this or point it to a specific picture?

Hope some one can help
Create image 50 x 50 pixel

add before </head>

this line

<meta property="og:image" content="http://URL YOUR IMAGE"/>
dr16049
Registered User
Posts: 31
Joined: Tue Mar 25, 2008 12:45 am

Re: The new Facebook like button

Post by dr16049 »

Create image 50 x 50 pixel

add before </head>

this line

<meta property="og:image" content="http://URL YOUR IMAGE"/>
Ok, but in what am I putting this. I am on the phpbb forum with this and the photos its pulling are from the forum. Your quote looks like you are saying to put it on my index page of the website. I will try that, if I am wrong, someone please correct me.
dr16049
Registered User
Posts: 31
Joined: Tue Mar 25, 2008 12:45 am

Re: The new Facebook like button

Post by dr16049 »

Create image 50 x 50 pixel

add before </head>

this line

<meta property="og:image" content="http://URL YOUR IMAGE"/>
Ok, but in what am I putting this. I am on the phpbb forum with this and the photos its pulling are from the forum. Your quote looks like you are saying to put it on my index page of the website. I will try that, if I am wrong, someone please correct me.

Edit: I think you want it in overall header html

Edit 2: I did put it in the overall header and it seems to be working. Sometimes though instead of the topic title it give the code for where it is when it posts on FB.

Now I have to add the bots back to the forum again.
dr16049
Registered User
Posts: 31
Joined: Tue Mar 25, 2008 12:45 am

Re: The new Facebook like button

Post by dr16049 »

Still works, but somehow it is not liking the thread anymore.
When you like it, it shows up on FB as I like the website its on and not the actual thread.
Any ideas?
User avatar
portugas
Registered User
Posts: 37
Joined: Sun Dec 03, 2006 7:14 pm

Re: The new Facebook like button

Post by portugas »

the final......
<!-- Facebook Like button Start-->
<iframe src="http://www.facebook.com/plugins/like.php?href=[www.yourSite.com]%2Fviewtopic.php%3Ff%3D{FORUM_ID}%26t%3D{TOPIC_ID}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>
<!-- Facebook Like button End-->
is very ok, test if you like....
Locked

Return to “[3.0.x] MOD Requests”