Sharing

General discussions.

Moderator: moderators

Sharing

Postby muvipix » Wed May 08, 2013 2:20 pm

Not a huge deal, but when I shared music to Facebook in the past, it would show the album art:

Image1.jpg


So I thought that maybe upgrading to 4.8 would fix the problem, but I still get the following:

Image2.jpg


It also used to show my actual sub-domain address, now just the IP.

Is this possibly a Java (7, update 21) issue?

Thanks.
muvipix
 
Posts: 25
Joined: Sat Jan 07, 2012 8:07 pm

Re: Sharing

Postby muvipix » Sun May 12, 2013 3:10 pm

Any ideas at all as to why this broke?
muvipix
 
Posts: 25
Joined: Sat Jan 07, 2012 8:07 pm

Re: Sharing

Postby gurutech » Sun May 12, 2013 9:04 pm

Happens for me too. I think it's a "new feature" of Facebook....
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: Sharing

Postby Tearstar » Tue Jun 11, 2013 11:10 am

It's easy to fix

Look inside the following folder (your path may be a bit different)

subsonic\jetty\3434\webapp\WEB-INF\jsp

look at file

externalPlayer.jsp

directly after this bit of code

Code: Select all
    <sub:url value="/coverArt.view" var="coverArtUrl">
        <c:if test="${not empty model.coverArt}">
            <sub:param name="path" value="${model.coverArt.path}"/>
        </c:if>
        <sub:param name="size" value="200"/>
    </sub:url>

Make sure your next 3 lines are something like this

Code: Select all
    <meta name="og:title" content="${fn:escapeXml(model.songs[0].artist)} &mdash; ${fn:escapeXml(model.songs[0].albumName)}"/>
    <meta name="og:type" content="album"/>
    <meta name="og:image" content="http://eradio.sytes.net${coverArtUrl}"/>

(changing the http://eradio.sytes.net to your domain name or ip address)

Then right under

Code: Select all
</head>
<body class="mainframe bgcolor1" style="padding-top:2em" onload="init();">


Place the following bit of code

Code: Select all
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


And should work fine
Tearstar
 
Posts: 9
Joined: Wed May 01, 2013 6:02 pm

Re: Sharing

Postby muvipix » Tue Jun 11, 2013 12:12 pm

Thanks. This fixes the showing of the domain instead of IP address, but still no album art.
muvipix
 
Posts: 25
Joined: Sat Jan 07, 2012 8:07 pm

Re: Sharing

Postby Tearstar » Wed Jun 12, 2013 8:15 am

Works for mine, You might have to play around with it a bit but the key lies in the line of code

Code: Select all
<meta name="og:image" content="http://eradio.sytes.net${coverArtUrl}"/>


That is the line that tells facebook where to find your image.

Another note is you might have to go to facebook's "linter" if you have already shared the link once, then facebook may not display your image.

The linter is located at

https://developers.facebook.com/tools/debug

This may also help you debug your link.
Tearstar
 
Posts: 9
Joined: Wed May 01, 2013 6:02 pm

Re: Sharing

Postby muvipix » Wed Jun 12, 2013 10:49 am

Thanks again.

I played around with it some more and found that if I refresh the page (ie, after clicking "Share on Facebook"), the album art appears... kind of a quirky workaround, but it seems to work every time. Happens in all browsers, too (so not browser specific).
muvipix
 
Posts: 25
Joined: Sat Jan 07, 2012 8:07 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests