0

I've tried to find the answer to my problem by browsing through similar, older threads here, but I can't seem to find a solution for my problem.

I have sharing buttons for the most common social networks. I've had them forever and all of them always worked. Only that Facebook and Google+ recently stopped working properly and I can't figure out why.

As for the Facebook sharing it won't retrieve any information. It will only share my blog's URL without grabbing the title, text or image. If I copy and paste the URL directly into Facebook to share, the same thing happens.

As for Google+, whenever I hit the button I get an error. If I just copy and paste the link into Google+ directly, it will properly receive all the necessary information, though. I guess just finding a different code for the Google+ button itself might do the trick.

Here's my blog (sample blog post where you can see and try the sharing buttons yourself).

My header.php: http://pastebin.com/uype2BET

The code concerning the sharing buttons in my single.php:

 <ul class="social_buttons">
 <li><a href="http://twitter.com/share" class="twitter-share-button"
      data-url="<?php the_permalink(); ?>"
      data-via="zoomingjapan"
      data-text="<?php the_title(); ?>"
      data-related="zoomingjapan: Admin of Zooming Japan"
      data-count="horizontal"
data-lang="en">Tweet</a></li>
<li> <g:plusone size="medium" callback="plusone_vote"></g:plusone></li>
<li style="margin-left:-10px;">
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" target="blank"><img src="<?php bloginfo('template_directory'); ?>/images/facebook-share.jpg" alt="Share this article on Facebook" /></a></li> 
<li style="margin-left:-10px;"><div class="fb-like" id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" show_faces="false" layout="button_count"></fb:like></li>
<li><?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>
<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a></li>

</ul>   
  • working fine for me. – Robert hue Jan 23 '15 at 23:03
  • @Roberthue Thanks for the feedback. It only works for some blog entries, but more often than not it doesn't work. – japanworm Jan 24 '15 at 12:36
  • cab you post a link where it doesn't work – Robert hue Jan 27 '15 at 4:48
  • Pretty much all the newer posts like this one: zoomingjapan.com/travel/otaru-snow-light-path-festival Facebook share doesn't work at all, but Google+ seems to work. – japanworm Jan 28 '15 at 10:52
  • Please do not link to outgoing sources. Those can be fade away and the question will be impossible to understand. File an edit and fix that pastebin link, please. And please keep that in mind for question nr. 79. – kaiser Jan 30 '15 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.