Addthis default facebook image

2019-01-15 21:49发布

问题:

I have a problem when i'm trying to share mi content page with Addthis. When i try to share the page, the sharing popup doesn't get the image of the article, the share is getting all the images in the article. i have in the headers:

But even with that doesn't work, someone can help me with this?

回答1:

You need to have og:image tag specified like this:

<meta property="og:title" content="AddThis Smart Layers: Personalizing the Web" />
<meta property="og:image" content="http://farm6.staticflickr.com/5486/9262576856_3e294841e2_o.png" /> 
<meta property="og:description" content="Introducing the next generation of web tools: AddThis Smart Layers." />  
<meta property="og:url" content="http://www.addthis.com/blog/2013/07/11/addthis-smart-layers" />

Here's an article on how to implement og tags:

http://www.addthis.com/blog/2013/07/25/optimize-smart-layers-with-open-graph/#.Uz4Vea1dVig



回答2:

What Worked For Me

If you happen to be trying to use AddThis with UTM codes or other querystring variables, here's what finally worked for me.

As per Sol, use OpenGraph meta tags but then use the FB Debugger to verify that Facebook cache has been refreshed and got all the proper meta tags in the page header correctly, then verify that there are no querystring UTMs/variables your AddThis sharing link to facebook. For my purposes, Index.html couldn't include any querystring variables or AddThis passed the URL incorrectly to Facebook. The only way that worked for me looks like this:

<a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?pco=tbx32nj-1.0&amp;url=https%3A%2F%2Fwww.example.com%2Findex.html" target="_blank" ><img src="http://cache.addthiscdn.com/icons/v1/thumbs/32x32/facebook.png" border="0" alt="Facebook" /></a>

What Failed For Me

When trying to use the below AddThis "data_track_addressbar" and "addthis_widget.js" modules for sharing, Facebook completely fail to pull the new OpenGraph Meta Tags.

<script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script>