Sharing with Google+ problems

When using the share function with google+ to share a photo, video, or sound, the description ends up being populated with information from the menu. Also, images that are attached with the video or sounds are not transferring over to google. I was able to reproduce the description problem on the dolphin test server. I have attached a screen shot if the problem. 

 

Anyone have an idea of what files are used to call this, I would like to take a look at them. Thank you for your time.

Michael
Quote · 15 Dec 2012

Am I the only one seeing this?

Michael
Quote · 22 Dec 2012

Have you looked this over?

https://developers.google.com/+/plugins/+1button/#plus-snippet

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 22 Dec 2012

Thanks for the reply Newton and the information, I will use it when I am making my own plus buttons. The problem I am having is with the one provided with dolphin in photos, videos, and sounds. I know where to find the snippet in the sys_objects_social_sharing, but what I am looking for is how that gets populated, the string that is being passed to it. There is a problem there in the fact that it is pulling the description like it should, but it is also pulling random information as well. If you look at the photo, which is from the demo site, you will see that it is pulling part of the menu items. I am just wondering if it is something local to me or if it is a problem with everyone. Thanks for you info though :) 

 

 

 sys_objects_social_sharing

Michael
Quote · 23 Dec 2012

Netdaddi you need to change the link to picture as its takes peeps straight to your server log in :O)

Quote · 23 Dec 2012

Now I am confused Mingle, the image is fine and the title of the image is fine it is just the description that is the problem. Which link change are you referring too? lol

Michael
Quote · 23 Dec 2012

 sys_objects_social_sharing

Quote · 23 Dec 2012

Sorry Mingle, still confused about why i will be making the change to the snippet in the database. Everything seems to be fine, photo comes up, favicon comes up, photo title comes up, link back to my site is functional, just the description is the problem. I feel that I should be putting a tag on the description in the html file. I was reading the link Newton gave me and it states this

The page's <link rel="canonical" ... /> tag

If the +1 button's href attribute is not provided, Google uses the page's canonical URL.  

This is why it is pulling the title. Any thoughts?

Michael
Quote · 23 Dec 2012

Just click on the link you posted this is not about you google+ post its about the link you posted in this post it takes people who click on it to you server log in talk about luna :O)

 

 sys_objects_social_sharing <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< you can not edit it now ask a moderator to remove it

Quote · 23 Dec 2012

The post is about clicking on the google+ button from within a photo, videos, sounds and the description list menu options. I will make it simple, I need to know how the google snippet receives the description. Everything I am reading on google tells me that it need to be tagged. I can not find in any of the files where the tag is taking place for the description. I do see in the BxPhotosPageView.php file the line:

 $aRel = array($this->aFileInfo['medTitle'], $this->aFileInfo['medDesc'], $this->aFileInfo['medTags'], $this->aFileInfo['Categories']);

 But nothing flagging 'medDesc' for the google snippet. With videos and sounds there are other problems too, but I want to get this one going first. Thanks for any input. 

 

Michael
Quote · 24 Dec 2012

I just want to state it again, that this is also a problem on the demo site. The photo first posted is from the demo site. 

Michael
Quote · 24 Dec 2012

That google+ code is generic because it is used for so many different pages.

I think your only option is to try the "og" meta tags, experiment with it.

The option I have used in the past for getting your "icon" and "site info" automatically pulled.

 Add this to your /templates/base/_header.html for UNI template

for 3rd party template.. /templates/tmpl_yourtemplate/base/_header.html or could be _sub_header.html

just before
<title>__page_header__</title>
after
<meta http-equiv="Content-Type" content="text/html; charset=__page_charset__" />
this is what you want

<meta property="og:title" content="YOURSITE.COM">
<meta property="og:image" content="http://YOURSITE.COM/images/YOUR_LOGO_IMAGE_TITLE.png">
<meta property="og:site_name" content="CONTENT DESCRIPTION">
<meta property="og:description" content="This information here will show on every single sharethis, twitter, Google+, or Facebook Post.">

Change to your needs of course and back up all files first!!!!!

 

Taken from post, http://www.boonex.com/forums/topic/Facebook-Connect-Button-.htm

 

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 24 Dec 2012

Thanks again Newton for your help and the information will come in useful for the like button for my site. But this is really a problem with the sharing of photos, videos, and sounds for the member to google+ and it is part of 7.1. I really think it is a bug, as there are no og tags for the items that google+ share is looking for so it is just pulling what it can. Alex, can you please look at this issue when you have time? Thanks again for your help Newton. 

Michael
Quote · 25 Dec 2012

so it is just pulling what it can

 

4. Best guess from page content (not recommended)
If none of the previous data is present, Google parses the page and attempts to find the best title, description, and image.

 

 

Note: The logic that fetches the +Snippet data respects cache-control directives, so changes to your page might not immediately be reflected in the +Snippet.

 

 

I do agree with you, but I don't think this can be done.

Have you tried to make your own "recommend" box with the google+ info? You can't, you have to know the info of the image for each image which cannot be added to every google+ code until uploaded.

This is what google plus sees when you have an image..

<img class="bx-def-round-corners bx-def-shadow" src="http://mynewbeetle.net/m/photos/get_image/file/c00b9f358c719f796a5b3d8c8a76f253.jpg" onclick="lightroom(this)">

Of course the image name is not that, but http://mynewbeetle.net/m/photos/view/bkg1

also again, for all what you want to happen is not easy to do with Dolphin because google plus does not have the images URL nor the image description until such image is uploaded.

I know you have seen this... but the very last statement is the most important, number four.

1. Schema.org microdata (recommended)
If the page is annotated with schema.org microdata, the +Snippet will use the nameimage, and description properties found on any schema.org type.
<bodyitemscopeitemtype="http://schema.org/Product">
 
<h1itemprop="name">Shiny Trinket</h1>
 
<imgitemprop="image"src="{image-url}"/>
 
<pitemprop="description">Shiny trinkets are shiny.</p>
</body>
Tip: Google also uses schema.org microdata to generate rich snippets in search. See the schema.org FAQ for more information.
2. Open Graph protocol
If the page contains Open Graph properties for the title, image, and description, they will be used for the +Snippet.
<metaproperty="og:title"content="..."/>
<metaproperty="og:image"content="..."/>
<metaproperty="og:description"content="..."/>
3. Title and meta "description" tags
If the page's <head> element contains <title> and <meta name="description" ... /> tags, the +Snippet uses the title and the content attribute of the description meta tag for the snippet description. For the thumbnail image, the sharebox attempts to find a suitable image on the page.
<title>...</title>
<metaname="description"content="..."/>
   
4. Best guess from page content (not recommended)
If none of the previous data is present, Google parses the page and attempts to find the best title, description, and image.

Note: The logic that fetches the +Snippet data respects cache-control directives, so changes to your page might not immediately be reflected in the +Snippet.

some of this http://schema.org/docs/gs.html

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 25 Dec 2012

Newton,

 

Once again thank you for the rely, the information you provided is very detailed and is what I have been reading. I understand how difficult it would be to do that when you have many photo and descriptions.

 

But I will say this, if I am looking at one photo, video, or sound the page is putting all the information google needs. ie. /m/photos/view/myphoto, I have the photo itself that google pulls, the title which is also collected, and a description that google ignores. When the photopageview is rendered, it should be tagging the description with the og tag. Right now google just grabs what it wants (best guess), but if the description was tagged it would pull the description as well and everything would be fine. With videos and sounds, the description as well as the thumbnails are missing.

 

It should not be hard to correct, you have one 1 description for the page and one image. Just through the og tag and it is functional. It should just be 1 line of code for the photos and 2 lines for the videos and sounds, all the variables are there already when the page is called. I would try it myself, but not being a programmer or that knowledgeable with PHP, I would not know where to start.

 

I don't want to call this a bug, because it is in my eyes and oversight. But at the same time, you can have a feature that is only half functional. If I recall, Andrew put heavy emphasis on this feature when he was promoting 7.1. 

Michael
Quote · 25 Dec 2012

It totally understand what your talking about.

The thing is, that button, from all the media pages looks to the one line from the database.

Now if a great programmer could come up with three separate codes, have it determine what the media is and pull the info.

Maybe AlexT will see this thread and enlighten us some more on what we could add to the database entry. 

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 25 Dec 2012

Alex, maybe you or someone else can give a little help on this. I am trying to add to the getBlockCode_SocialSharing () function in BxPhotosPageView.php the description, by making the highlighted changes. The problem is that I need to make the description and most likely the other items look something like this <metaproperty="og:description"content="$sDescription"/>. 

Can someone give me some insight on how to do this or let me know if I am even in the right file making the changes. Thanks in advance for your time. 

    

    function getBlockCode_SocialSharing ()

    {

        $sUrl = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $this->aFileInfo['medUri'];

        $sTitle = $this->aFileInfo['medTitle'];

        $sDescription = $this->aFileInfo['medDesc'];        

        $sImgUrl = $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file');

 

        bx_import('BxTemplSocialSharing');

        $sCode = BxTemplSocialSharing::getInstance()->getCode($sUrl, $sDescription, $sTitle, array (

            'img_url' => $sImgUrl,

            'img_url_encoded' => rawurlencode($sImgUrl),

        ));

        return array($sCode, array(), array(), false);

    }

Michael
Quote · 26 Dec 2012

Ok this truly needs to be fixed. This is a bug. I mean we are paying for a functional software. The reason why this problem is happening is pretty much irrelevant.

Quote · 26 Dec 2012

Can anyone let me know if I am on the right track with this one please. Are there other files I should be looking at too? 

Alex, maybe you or someone else can give a little help on this. I am trying to add to the getBlockCode_SocialSharing () function in BxPhotosPageView.php the description, by making the highlighted changes. The problem is that I need to make the description and most likely the other items look something like this . 
Can someone give me some insight on how to do this or let me know if I am even in the right file making the changes. Thanks in advance for your time. 
    
    function getBlockCode_SocialSharing ()
    {
        $sUrl = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $this->aFileInfo['medUri'];
        $sTitle = $this->aFileInfo['medTitle'];
        $sDescription = $this->aFileInfo['medDesc'];        
        $sImgUrl = $this->oSearch->getImgUrl($this->aFileInfo['Hash'], 'file');
 
        bx_import('BxTemplSocialSharing');
        $sCode = BxTemplSocialSharing::getInstance()->getCode($sUrl, $sDescription, $sTitle, array (
            'img_url' => $sImgUrl,
            'img_url_encoded' => rawurlencode($sImgUrl),
        ));
        return array($sCode, array(), array(), false);
    }

 

Michael
Quote · 2 Jan 2013

I get it now Newton, after researching it more I understand that there is no way to do this without it being in the _header.html. So what needs to happen is that the information from BxPhotoPageView / function getBlockCode_SocialSharing () needs to be wrapped up with the og tags and injected into the _header.html. 

 

I am not sure where to go with this, anyone have any ideas on the best way to handle this? 

Michael
Quote · 2 Jan 2013

 

I get it now Newton, after researching it more I understand that there is no way to do this without it being in the _header.html. So what needs to happen is that the information from BxPhotoPageView / function getBlockCode_SocialSharing () needs to be wrapped up with the og tags and injected into the _header.html. 

 

I am not sure where to go with this, anyone have any ideas on the best way to handle this? 

 Wink

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 2 Jan 2013

Ok, I have got the answer for this. I just want to let people know I have only tested it with the Google Share, not Facebook or Twitter. It should work with both because the changes loosely fallows Schema's guidelines. I am going to work on making 100% with Schema, but I just wanted the functionally for right now. Also if the videos, I have only tested Youtube videos.  

The changes will make sure the correct Title, Image, and Description are being passed to the Social Sharing buttons. Photo's are handled a little differently by Dolphin, but Sounds and Videos are handled the same.

I am not a programmer and there may be a better way to handle this, so if anyone sees an easier way to do this please note it.   

Photos.rtfd.zip · 1.5K · 456 downloads
sound.rtfd.zip · 1.5K · 415 downloads
video.rtfd.zip · 1.6K · 423 downloads
Michael
Quote · 12 Jan 2013

 

Ok, I have got the answer for this. I just want to let people know I have only tested it with the Google Share, not Facebook or Twitter. It should work with both because the changes loosely fallows Schema's guidelines. I am going to work on making 100% with Schema, but I just wanted the functionally for right now. Also if the videos, I have only tested Youtube videos.  

The changes will make sure the correct Title, Image, and Description are being passed to the Social Sharing buttons. Photo's are handled a little differently by Dolphin, but Sounds and Videos are handled the same.

I am not a programmer and there may be a better way to handle this, so if anyone sees an easier way to do this please note it.   

 Glad to see you came up with a working solution for this.

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 12 Jan 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.