The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Blogger "Post To MySpace" Link - HELP
TheBSper
post May 1 2009, 08:36 PM
Post #1





Group: Members
Posts: 5
Joined: 1-May 09
Member No.: 8,501



Hi,

I have scoured every corner of the internet over the past three days trying to find a fix for this problem, but have had no luck. For the record I'm fairly inexperienced with XML, and code in general. I will try to be as clear as possible, here's what happened:

I just added links to the footer section of each of my blog's posts to allow my readers to share the post on various social
bookmarking sites, Twitter, and Facebook. Everything has gone relatively smoothly, until I started trying to add the link for a
"Post To MySpace" button.

MySpace provides the code, along with some explanation for how to do this, here: http://x.myspace.com/download/posttomyspac...entation001.pdf, but if you copy and past it directly Blogger gives you a bunch of XML errors.

There are two ways to implement the "Post To MySpace" code, one is based on a "Post" <form> code, and the other is a "Get" based code (that's what the PDF from MySpace says, I don't really know what that means). I tried using both methods, but I could never get Blogger to accept the code for the "Post" method because I kept getting XML errors. I did manage, with a few hours of research and tweaking, to get make the Get-based code to pass the XML inspection. The problem is that it doesn't work. The icon shows up exactly as I want it to, but when you click on it nothing happens.

I made the following changes to the original code. 1) In order to make the Get-based code they gave pass the XML requirements, I had to change some of the "&" symbols into "&". 2) To get it to appear how I wanted, I changed the <img src= so that it uses the icon I want, got ride of the border with style='border: none', and deleted the text before the </a> so that there are no words the link is just an image. 3) last thing I did was fill out the sections where you need to enter the post's information with the title "Test Title" and http://www.google.com for the URL, just as test values to see if it worked.

Here is the code as it appears in the Edit HTML Layout section of my blog. I included the two other share codes that come before it, just in case they are somehow getting in the way of this one. If you need to know what comes after it let me know and I'll post that.

div class='post-footer'>
<div class='post-footer-line post-footer-line-1'>

<!-- Start of social bookmarks. Check http://tips-for-new-bloggers.blogspot.com/
for updates -->

<br/><br/>Share This Post:<br/>

<!-- Share On Twitter Code -->

<span style='float: left; left no-repeat; '><script charset='utf-8' src='http://bit.ly/javascript-api.js?version=latest&login=tweettrackjs&apiKey=R_7e9987b2fd13d7e4e881f9cbb168f523' type='text/javascript'/>
<script charset='utf-8' src='http://s.bit.ly/TweetAndTrack.js?v=1.01' type='text/javascript'/>
<a expr:onclick='"return TweetAndTrack.open(this, \"" + data:post.url + "\");"' href='#'>
<span style='display:none;'>Check out this article: <data:post.title/></span><img alt='Twitter' src='http://www.divergencemusic.net/images/twitter32.png' style='border: none;'/></a></span>

<!--Share On Facebook Code -->

<a expr:href='"http://www.facebook.com/sharer.php?u=" + data:post.url + "&t=" + data:post.title' target='_blank'><img alt='Facebook' src='http://www.divergencemusic.net/images/facebook32.png' style='border: none;'/></a>

<!--Share On MySpace Code -->

<script type="text/javascript">
function GetThis(T, C, U, L)
{
var targetUrl = 'http://www.myspace.com/index.cfm?
fuseaction=postto&' + 't=' + encodeURIComponent(T)+ '&c=' +
encodeURIComponent© + '&u=' + encodeURIComponent(U) + '&l='
+ L;
window.open(targetUrl);
}

</script>
<a href="java script:GetThis('Test Title',’’, 'http://www.google.com',
‘’)">
<img src="http://www.divergencemusic.net/images/myspace32.png"
style='border: none' alt="MySpace" /></a>

My blog is located here, http://divergencemusic.blogspot.com, PLEASE help me fix this! You can also find a working version of what I want at the bottom of this post: http://mashable.com/2008/11/19/fleck-lite/

I'm sure you also noticed that, since you're entering specific information in the title and URL fields, it will only add that specific post no matter where the icon appears on the site. I'm hoping to get it working with absolute values first, and then try using <a expr:href and data:post.title/post.url so that it will fill in the information based on which post the link appears on. Getting a final working version of the code, with the data:post.title & post.url already inserted, would be AMAZING if someone could make that happen, but I can try to fix the other stuff on my own if I can just get it working period.

THANK YOU in advance for helping.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 1 2009, 10:25 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



What happened with the form from the PDF?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
TheBSper
post May 2 2009, 01:05 AM
Post #3





Group: Members
Posts: 5
Joined: 1-May 09
Member No.: 8,501



QUOTE(pandy @ May 1 2009, 11:25 PM) *

What happened with the form from the PDF?


When I tried it before I kept getting XML errors about <div> not ending correctly. This time I entered the following code and it was valid, but again it didn't do anything. Not only that, it really messed up the arrangement of the other icons. The first two icons were fine, but the MySpace icon appeared underneath the first two icons, and then the rest of the icons appeared below the MySpace one.

<form action='http://www.myspace.com/index.cfm?fuseaction=postto' id='myspacepostto' method='post' target='_blank'>
<input name='t' type='hidden' value='Test Title'/>
<input name='c' type='hidden' value=''/>
<input name='u' type='hidden' value='http://www.google.com'/>
<input name='l' type='hidden' value=''/>
<a href='#' onclick='document.getElementById('myspacepostto').submit();return false;'>
<img alt='MySpace' src='http://www.divergencemusic.net/images/myspace32.png' style='border:none'/></a>
</form>

What am I doing wrong? =(
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
fouls
post May 8 2009, 07:08 AM
Post #4





Group: Members
Posts: 1
Joined: 8-May 09
Member No.: 8,552



I have no experience with these codes either and I have been having exactly the same problem. On this website they seem to have managed to make an alternative method work. They use this code:

CODE
<a title="Add to MySpace" href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://cabinetofseeds.wordpress.com/2009/01/11/mfm/" target="_blank"><img src="http://www.baeblemusic.com/images/shareIcons/share_myspace.png" border="0" alt="Add to MySpace" /></a>


This seems not to post actual blog posts on MySpace, rather it posts a link. Neither does it fill in the title or description or any of that. I have tried to make the code generic and work for any post with "data:post.url" but, so far, I have been unsuccessful.

Please tell me how you get on with this. It seems so much more difficult to make this work with MySpace than it does any other site.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
TheBSper
post May 14 2009, 03:29 PM
Post #5





Group: Members
Posts: 5
Joined: 1-May 09
Member No.: 8,501



QUOTE(fouls @ May 8 2009, 08:08 AM) *


CODE
<a title="Add to MySpace" href="http://www.myspace.com/Modules/PostTo/Pages/?c=http://cabinetofseeds.wordpress.com/2009/01/11/mfm/" target="_blank"><img src="http://www.baeblemusic.com/images/shareIcons/share_myspace.png" border="0" alt="Add to MySpace" /></a>


Please tell me how you get on with this. It seems so much more difficult to make this work with MySpace than it does any other site.


DUDE IT WORKS! If you're using the "New" Blogger use this code and it will automatically share the URL for the specific blog entry the person clicks the "post to myspace" icon under:

CODE
<a expr:href='"http://www.myspace.com/Modules/PostTo/Pages/?c=" + data:post.url' target='_blank'><img alt='Post to MySpace' src='YOUR-IMAGE-HERE.png' style='border: none;'/></a>


Enjoy!! and THANKS for the help!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 07:31 AM