Share on facebook - Picture

  • Hi all,

    When i share a thread on Facebook with share button, i get a text and a square without any picture.

    If there is no picture inside the thread, would it possible to manage a default picture for sharing on facebook ?

    Thx

    Myk

  • No, that is only for css changes and custom css.
    You can insert the meta tag if you edit the template headInclude

    i added the following code in headinclude of specific style :
    <meta property="og:image"content="https://xxx.com/wcf/images/facebooklogo.jpg"/>

    Like this :

    <base href="{$baseHref}" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="format-detection" content="telephone=no" />
    {if $allowSpidersToIndexThisPage|empty}<meta name="robots" content="noindex,nofollow" />{/if}
    {implode from=$__wcf->getMetaTagHandler() item=__metaTag glue="\n"}{@$__metaTag}{/implode}
    {event name='metaTags'}


    <!-- Stylesheets -->
    {@$__wcf->getStyleHandler()->getStylesheet()}
    {event name='stylesheets'}


    {include file='headIncludeJavaScript'}


    <script data-relocate="true">
    WCF.Language.addObject({
    {* dummy language item to preserve compatibility with WCF 2.0, move this to headIncludeJavaScript *}
    'wcf.global.error.title': '{lang}wcf.global.error.title{/lang}'

    {* DEPRECATED -- PLEASE USE javascriptLanguageImport@headIncludeJavaScript *}
    {event name='javascriptLanguageImport'}
    });
    </script>


    {* DEPRECATED -- PLEASE USE javascriptInclude@headIncludeJavaScript *}
    {event name='javascriptInclude'}


    <!-- Icons -->
    <link rel="icon" href="{@$__wcf->getFavicon()}" type="image/x-icon" />
    <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />


    <script data-relocate="true">
    //<![CDATA[
    $(function() {
    {* DEPRECATED -- PLEASE USE javascriptInit@headIncludeJavaScript *}
    {event name='javascriptInit'}
    });
    //]]>
    </script>
    <meta property="og:image"content="https://xxxxx.com/wcf/images/facebooklogo.jpg"/>

    But doesn't work :/ No picture on FB.

  • ok, it works, i forgot "www" :)

    But i removed meta tag because, for blog post, default picture will be use :/

    I would like default picture is use if there is no picture in thread or blog post; but maybe hard to manage this ?

  • The post may be old but the final question asked here is exactly my problem at the moment. I have added the meta tag:

    meta property="og:image"content="https://xxxxx.com/wcf/images/facebooklogo.jpg"/>

    just as suggested above, and I am now getting a site logo when I share to Facebook. But when I am sharing a post that has a photo included in it, I would prefer that the share contain the posts' photo, rather than the site logo. Is there a way to do this via plugin or otherwise?

    thanks

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!