Topic: Social share bug

When I try to share a blog post at Facebook/Google+ I can share only a general picture, title and description, not just the actual blog post. Please help me to solve this problem.
This is our page: http://multistone.hu/index2.php?control … ory=konyha

Re: Social share bug

Nice looking site!

Rather than a bug, that is the typical expected behavior of a share link.

Re: Social share bug

You can make a simple favicon* for your website
http://tools.dynamicdrive.com/favicon/

The favicon is sometimes set in your theme
<link rel="shortcut icon" href="/themes/simpler/css/img/favicon.ico" type="image/x-icon">

*A favicon is a small, 16x16 image that is shown inside the browser's location bar and bookmark menu when your site is called up. It is a good way to brand your site and increase it's prominence in your visitor's bookmark menu.

Re: Social share bug

grwebguy wrote:

Nice looking site!

Rather than a bug, that is the typical expected behavior of a share link.

Thanks.

I have solved the problem:

Find social share url codes in admin\kernel\helpers\post.class.php

1 of them for example:

    public static function facebook($text=false)
    {
        global $post;

        $text = $text===false?'':$text;

        $url = Url::post($post, true);

And change to:

public static function facebook($text=false)
    {
        global $post;

        $text = $text===false?'':$text;

        $url = str_replace('&amp;', '&', Url::post($post, true));

Re: Social share bug

Thanks for posting the solution!

6 (edited by chase 02-03-2016 21:50:30)

Re: Social share bug

orkester wrote:

Find social share url codes in admin\kernel\helpers\post.class.php



Thank you for sharing orkester!

Since the facebook share link parameters have changed  Note you will also need to change the next line of code which contains the facebook link.


the original code is:

    return 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($text.' '.$url);

change to:

    return 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url);

So your final code should look like this:

    public static function facebook($text=false)
    {
        global $post;

        $text = $text===false?'':$text;

        $url = str_replace('&amp;', '&', Url::post($post, true));
        return 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url);
    }