Industry guru Dave Taylor offers free tech support on a wide variety of technical and business topics, including HTML, Apple iPhone, online advertising, Cascading Style Sheets, Web design, management, Unix, Linux, search engine optimization, online dating, Mac OS X, shell script programming and Microsoft Windows.

How can I create a MySpace Message Me button?

I read your article about how to create a nice MySpace "add me" button on my Web site and am wondering, is it possible to create those buttons, but for Message Me and Block Me?


Dave's Answer:

It certainly seems to me that it should be doable, though I'm a bit baffled why you would want to have a nice button for "block me". I mean, do you find that your friends, or, um, former friends, are blocking you that frequently that you'd want a button for that particular task available?

To quote the MySpace help, "Blocked users can still view your profile, but they cannot send you a message or communicate with you. If you do not want them to see your profile, you can adjust your privacy settings." I'll assume you have some reason to make it easy for people to want to block you.

One thing to correct here in the beginning is that the button you want to create is "Block User", not "Block Me", though once you are almost done tweaking the code I'll show shortly, you'll be able to change the label as desired.

The first step, once you've logged in to your MySpace account, is to click on "Profile" in your MySpace Control Panel:

MySpace Control Panel

The next page you see will have a lot of edit boxes, but the link you want is on the top right, the View My Profile link:

MySpace: Profile Edit

Now you should be viewing your profile as someone else would see it, and just below your picture should be a "Contacting" box, like this:

MySpace: Contact Dave Panel

(well, your contact box might not be quite the same as mine. Quite likely it has a white background rather than my fancy profile. The good news is that you can learn how to customize your profile too with the myspace help offered throughout this site)

Just about there. The next step is to right click (or, if you're a Mac user, option-click) on the "Send Message" link and choose Copy Link. The URL you get will look something like this:

http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=65108791&
MyToken=965145b3-9e04-467e-8d72-a6a72ed5ab95

You can axe out the junk after "MyToken=", so in fact the trimmed URL looks like this:

http://messaging.myspace.com/index.cfm?fuseaction=mail.message&friendID=65108791

While we're here, scribble down or otherwise save your friendID. Mine, as you can see here, is 65108791.

To produce a button like what I showed in my earlier article you need to unwrap the link and make it a little HTML form. Or just let me do the work!

Here's what you need:

<form method="get" action="http://messaging.myspace.com/index.cfm">
  <input type="hidden" name="fuseaction" value="mail.message" />
  <input type="hidden" name="friendID" value="65108791" />
  <input type="submit" value="Message Me!" />
</form>

Simply substitute your own friendID value and paste the modified code onto your Web page, Facebook profile, or whereever else you might like.

Now, back to that Block User link. Turns out that this exact same technique will work fine and the code above is almost exactly what you need. Instead of it invoking "mail.message" as the "fuseaction", however, we need "block.BlockUser":

<form method="get" action="http://messaging.myspace.com/index.cfm">
  <input type="hidden" name="fuseaction" value="block.BlockUser" />
  <input type="hidden" name="friendID" value="65108791" />
  <input type="submit" value="Block Me!" />
</form>

That's all there is to it. Good luck with your tweaks. Curious about the other options? Looks like fuseaction could also be "invite.addfriend_verify", "groups.addtogroup", "mail.forward", "user.addToFavorite" and RateImage.UserRating". Hack away. :-)

Oh, and if you'd like, I invite you to check out my own MySpace profile too.



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon    

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

how do u write your about me with the words goin on the side and at the bottom of the picture

Posted by: tyler dantzler at January 20, 2008 12:48 PM

hey,
um, i got your message link,
but how do i get a comment one?

like, ive copied the code for the messgeing and block....
and then i tried the same with the comment thing.
like i placed thee http:// for my add comment
but the value at the bottom,
i couldnt get it.


so could you please send me the code for commenting?
thankyou

tieran
x

Posted by: tieran at January 25, 2008 7:33 AM

the same problem as tieran can you send me the code too please

Posted by: julia at May 24, 2008 6:27 PM

hey,
um, i got your message link,
but how do i get a comment one?

like, ive copied the code for the messgeing and block....
and then i tried the same with the comment thing.
like i placed thee http:// for my add comment
but the value at the bottom,
i couldnt get it.


so could you please send me the code for commenting?

thanks.

Posted by: lauryn sedillo at June 17, 2008 7:26 PM

wanna talk?
comment?

Posted by: Kaitlin at August 4, 2008 3:44 PM

i have the same question as what tieran wrote:

hey,
um, i got your message link,
but how do i get a comment one?

like, ive copied the code for the messgeing and block....
and then i tried the same with the comment thing.
like i placed thee http:// for my add comment
but the value at the bottom,
i couldnt get it.


so could you please send me the code for commenting?
thankyou

tieran
x

Posted by: nera at September 13, 2008 9:52 PM

send mehh tha comment linkkk tooo !

Posted by: Jadeeeeee; at October 21, 2008 1:23 PM

add some chat to my mail box

Posted by: banky03 at December 27, 2008 11:10 AM

How do I create a button for my customers to ask me a question on my blog space?

Posted by: Michelle DeLaGarza at March 20, 2009 2:09 PM

how do you make just a link??
not a button but a link for messages and comments???

Posted by: nicole at April 10, 2009 2:05 PM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!











Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan

Follow me on Twitter @DaveTaylor

Search
Find just the answers you seek from among our 2300+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Book Links
© 2002 - 2009 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.