Results 1 to 5 of 5

Thread: FB share on element level

  1. #1
    User
    Join Date
    11-09-09.
    Location
    Graasten, Denmark
    Posts
    31

    Default FB share on element level

    Hi ...

    I maintain several Contao sites, and I have a common problem with them all. I need to be able to add facebook "share this" button on a more precise level, than just the entire page, witch is what the built-in FB option does.

    Further more, I experience that recently added photos are not available as thumbnails in the share dialog. They appear at best after several weeks. And the text that goes into the share dialog is not the text of the article itself, but the text from the page description in the site structure :-(

    For example, see www.hesteportræt.dk

    For instance I add used motorcycles for a motorcycle company. They all appear on the same page in a long column. Do I really have to make an article for every element?


    Kind regards, Pino

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: FB share on element level

    I think you need to rethink the way you put contents in the website you linked.

    Take a look at the gallery extension
    Consulenza Contao CMS https://www.intco.it

  3. #3
    User
    Join Date
    11-09-09.
    Location
    Graasten, Denmark
    Posts
    31

    Default Re: FB share on element level

    Hmmmm ... my problem with the built-in FB share button still persists. Even after the last update to 2.11.11. The problem is, that when I tick the FB box on article level, it is not the content of that article that is shared through the frontend dialog - it's a combination of a top banner (imageslider) and a news post in the right side column (even though the article is in main column!)
    It has always been that way with all my 4 contao sites

    Any suggestions?

  4. #4
    User
    Join Date
    04-10-11.
    Posts
    162

    Default Re: FB share on element level

    This is more of an issue with the way that Facebook share works than Contao.

    When you share to Facebook you share the link to the page. Facebook will just grab the first bit of text it finds on this page, which in your case is the header text. To change this behaviour you need to tell Facebook which text you'd like it to use when sharing the page.

    You can do this by using a meta tag like this in your page:

    Code:
    <meta property="og:description" content="Article Description." />
    When you share the page Facebook will now use this instead of the first text that it finds.

    See the URL below for a more detailed look at this. You will probably mostly be interested in the section titled 'Creating a social snippet'.

    http://webdesign.tutsplus.com/articl...cial-snippets/

  5. #5
    Experienced user
    Join Date
    06-11-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: FB share on element level

    If you install [myfavicon] I also add the option to share a FB version of the favicon as the primary image, which you can then override per news/even/page. There are extensions to add the og:title, og:description to your template, or you can simply add these manually using a $GLOBALS['TL_HEAD'][] array add-on.

    You can also after posting content, immediately visit the facebook scraper to re-scrub your page, so that when people share it after you, it comes up correctly:
    http://developers.facebook.com/tools/debug

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •