Share on facebook - Picture
- myk32
- Thread is marked as Resolved.
-
-
-
Thx for your replay, i understand the process but where can i insert the meta code in BB ?
ACP > appearances > style > list style > xxx > advanced setting ?
-
No, that is only for css changes and custom css.
You can insert the meta tag if you edit the template headInclude. -
No, that is only for css changes and custom css.
You can insert the meta tag if you edit the template headIncludei 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.
-
I would add it below the other meta tags and the event..just my 2 cents.
It should work...you could check your url here: https://developers.facebook.com/tools/debug/sharing/
-
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
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!