× Joomla Facebook Connect support forum

Topic-icon Default "like" image

Active Subscriptions:

None
14 years 3 months ago #19276 by miccra
Default "like" image was created by miccra
Hi, I have JFBConnect set up to use the first image of an article as the image shown on facebook when somebody clicks "like". About 90% of my articles have images, but I probably have a hundred or more that DO NOT have images. So, as a default it uses random forum members of my site's avatar! Not sure exactly why it would do that, but I'd like to set up a default image for that situation, but what I'm thinking is that if I set up a default in Open Graph it will set a default for ALL articles, which I do not want.

Now, I know that I could put code in every article to set an image if somebody clicks "like", but I do not have the time to do that for all 100 plus articles. Is there a way to use the first image in the article, if there is one available, and then use a default if there is not one available?

Thanks
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19289 by mtk
Replied by mtk on topic Default "like" image

miccra wrote: Hi, I have JFBConnect set up to use the first image of an article as the image shown on facebook when somebody clicks "like". About 90% of my articles have images, but I probably have a hundred or more that DO NOT have images. So, as a default it uses random forum members of my site's avatar! Not sure exactly why it would do that, but I'd like to set up a default image for that situation, but what I'm thinking is that if I set up a default in Open Graph it will set a default for ALL articles, which I do not want.

Now, I know that I could put code in every article to set an image if somebody clicks "like", but I do not have the time to do that for all 100 plus articles. Is there a way to use the first image in the article, if there is one available, and then use a default if there is not one available?

Thanks

Hello,
the First Image setting is related to the entire website (first IMG tag the HTML shows), not just the image inside the article, therefore it will show the user's avatar when there is no other image found.

As for Open Graph, you could test that very easily:
set it up, and take two pages (one with image and one without). check Facebook's Debug tool: developers.facebook.com/tools/debug which will show you a nice debug of what FB sees from you link.
you should see one image (the default one) for the page without an image, and two images for the page with an image (the article's image and the default).
now click LIKE on those pages and you will get the default image for the page without image and the article's image for the page with image.

hard to explain, but pretty strait forward to test.

Let us know if you need anything else.
Mati
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19297 by miccra
Replied by miccra on topic Default "like" image
Ok, so I was wrong then...if you assign a default by using Open Graph code, it only uses that image you assign for articles with no image. The way it explains it in your documentation, it kind of sounds like it will change all images to that default image. I have it working fine now. Thanks a lot for your help.
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19299 by mtk
Replied by mtk on topic Default "like" image
Glad to help,
let us know if you need anything else.
The topic has been locked.