Author Topic: Share on facebook  (Read 10363 times)

0 Members and 1 Guest are viewing this topic.

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Share on facebook
« on: April 14, 2010, 09:39:44 AM »
Hi,

I have a problem to share photos on facebook.

I use the addthis button and works but only share the link...don't show the thumbnail. 8O

Can help me whit that.

Thanks
www.globalfoto.net
www.globalfoto.net

Sintra - Portugal

Offline hannes61

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Share on facebook
« Reply #1 on: August 12, 2010, 04:34:01 PM »
I have the same problem.
It worked, but since some time it don't. :-(

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Share on facebook
« Reply #2 on: August 12, 2010, 08:31:56 PM »
Through playing with my facebook connector mod, I have noticed that facebook needs to see certain things in the top of the html file for the shares for work correctly with thumbnail everytime...

on each page that is being shared...
above the first <head>
this needs to be inserted
Code: [Select]
<html xmlns:og="http://opengraphprotocol.org/schema/" >
Then inside the <head> </head> area of the page you need this information
This is copied from my site using data for one of my images being shared, yours will be different.
Code: [Select]
<meta property="og:title" content="14"/>
<meta property="og:type" content="http://www.budduke.com"/>
<meta property="og:url" content="http://www.budduke.com/gallery/details.php?image_id=5601"/>
<meta property="og:site_name" content="Bud's Place"/>
<meta property="og:image" content="http://www.budduke.com/gallery/data/thumbnails/166/14.JPG"/>
<meta name="description" content="something about your image"/>
og:title is the name of your image or title of what you are sharing
og:type is suppose to be website but someone told me to place link to my main domain there.
og:site_name is what your site is called
og:image is the direct path to your thumbnail you wish to use
description is how you want to describe the share.

having that info in your file should allow your shares with addthis work also, at least it did for my site.

the biggest trick is getting that info into the template correctly on each page.
If you look through my facebook connector mod you will see how I got the variables into the templates...

hopefully that helps!
Buddy Duke
www.budduke.com

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: Share on facebook
« Reply #3 on: August 13, 2010, 10:05:15 PM »
Hi,

Thanks for your help!

I i'l try this!

i have test site here www.fotosapretoebranco.com and I don't have any problem to share to facebook with this template. :roll:
www.globalfoto.net

Sintra - Portugal

Offline hannes61

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Share on facebook
« Reply #4 on: August 17, 2010, 12:33:27 PM »
@budduke
Thank you, i think I have to add your mod.

@fermachado
you are right, your side works.
My one do not.

I added the flag counter and this image can be shared on facebook, and sometime one or to more.
But most no others, even if the counter is higher, no tumbhnails are shown.

I think i have to add the code from above, but do not like to add it to every side, every image  by myself.

Offline tomtom86

  • Pre-Newbie
  • Posts: 7
    • View Profile
Problems with "share on Facebook"
« Reply #5 on: August 17, 2010, 07:11:20 PM »
Guten Abend ich habe eine Frage:

Ich habe in der (template)/details.html
Code: [Select]
{header}
<div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: 'deine ID App', status: true, cookie: true,
                 xfbml: true});
      };
      (function() {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = document.location.protocol +
          '//connect.facebook.net/de_DE/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>

und an gewünschter stelle :
Code: [Select]
<fb:like href="<?php echo "http://" $_SERVER['HTTP_HOST']  . $_SERVER['REQUEST_URI'];?>" layout="standard" show_faces="true" width="200" action="recommend" colorscheme="like" />
eingefügt.

die "Share on Facebook" funktion funktioniert auch bereits nur habe ich 2 Probleme:
  • Ich möchte nicht das die Gesichter der Personen Angezeigt wird die ein bild bereits "geliked" haben
  • weiters möchte ich nicht die Komplette Detailseite auf Facebook teilen sondern nur die Bilddatei selbst, d.h. aus details.php?image_id=566 , was ja automaitsch generiert wird beim klick auf ein Thumbnail , soll bei Share on facebook aus der Datenbank der pfad ausgelesen werden. (http://localhost/new/data/media/#/IMG_123456.JPG <<----- Dieser Pfad soll dan auf Facebook geteilt werden.



Ich hoffe jemand versteht mein Anliegen.


Grund für das Ganze.
Die Website wird privat für mich und meine freunde bereitgestellt und alle bereiche(Kategorien/Unterkategorien) sind passwortgeschützt und ich glaube genau deswegen wird beim "share on Facebook" immer nur http://localhost/new/index.php geteilt.

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Share on facebook
« Reply #6 on: March 23, 2011, 11:42:57 PM »
Through playing with my facebook connector mod, I have noticed that facebook needs to see certain things in the top of the html file for the shares for work correctly with thumbnail everytime...

on each page that is being shared...
above the first <head>
this needs to be inserted
Code: [Select]
<html xmlns:og="http://opengraphprotocol.org/schema/" >
Then inside the <head> </head> area of the page you need this information
This is copied from my site using data for one of my images being shared, yours will be different.
Code: [Select]
<meta property="og:title" content="14"/>
<meta property="og:type" content="http://www.budduke.com"/>
<meta property="og:url" content="http://www.budduke.com/gallery/details.php?image_id=5601"/>
<meta property="og:site_name" content="Bud's Place"/>
<meta property="og:image" content="http://www.budduke.com/gallery/data/thumbnails/166/14.JPG"/>
<meta name="description" content="something about your image"/>
og:title is the name of your image or title of what you are sharing
og:type is suppose to be website but someone told me to place link to my main domain there.
og:site_name is what your site is called
og:image is the direct path to your thumbnail you wish to use
description is how you want to describe the share.

having that info in your file should allow your shares with addthis work also, at least it did for my site.

the biggest trick is getting that info into the template correctly on each page.
If you look through my facebook connector mod you will see how I got the variables into the templates...

hopefully that helps!

so where is your facebook mod?

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Buddy Duke
www.budduke.com