Posttomyspacedeveloperdocumentation001

  • 238 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
238
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Adding Post To MySpace to Your Site What Is Post To MySpace? By adding the Post To MySpace (PTM) link, your visitors can easily share content from your site to their favorite sections of MySpace. With just a few clicks your content is visible across the largest social network in the world. With over 300+ million users, PTM offers the opportunity to significantly increase traffic back to your site. Stuff You Should Know Before Adding PTM Adding a PTM link to your site is easy but should be performed by someone with familiarity with simple HTML, including submission forms or JavaScript basics. If you want to automate the process, understanding your Content Management System (CMS) or server side programming is normally necessary. Step 1) COPY the PTM Link Code Copy the following code into a prominent location on your page where you want the Post To MySpace link to appear. <form id=quot;myspaceposttoquot; method=quot;postquot; action=quot;http://www.myspace.com/index.cfm?fuseaction=posttoquot; target=quot;_blankquot;> <input type=quot;hiddenquot; name=quot;tquot; value=quot;TITLE_GOES_HEREquot; /> <input type=quot;hiddenquot; name=quot;cquot; value=quot;CONTENT_GOES_HEREquot; /> <input type=quot;hiddenquot; name=quot;uquot; value=quot;URL_GOES_HEREquot; /> <input type=quot;hiddenquot; name=quot;lquot; value=quot;LOCATION_GOES_HEREquot; /> <a href=quot;#quot; onclick=quot;document.getElementById('myspacepostto').submit();return false;quot;> <img src=quot;quot; border=quot;0quot; alt=quot;Post to MySpace!quot; /> Share on MySpace! </a> </form> Step 2) REPLACE the Parameter Placeholders with Your Post Info PTM accepts 3 primary parameters: Title, Content, and URL. Only one of these 3 primary parameters is required (i.e. a post must have either a Title, • Content, or URL). Replace the corresponding placeholders in the selected code above (TITLE_GOES_HERE, • CONTENT_GOES_HERE, URL_GOES_HERE) with the specifics for your post. Both the Title and Content parameters accept un-encoded HTML, such as hyperlinks or • embedded images or videos. The Title parameter is limited to 90 characters. The Content parameter is limited to 2000 • characters. Be sure to leave the surrounding double quotes while escaping any double quotes that appear • within your post (e.g. <input type=”hidden” name=”t” value=“He said ”It’s True!”” />). PTM includes a 4th optional parameter: Location. This parameter determines the default location where the • Value Location post will appear on MySpace. The user can always change 1 Blog this location later. 2 Bulletin Replace the LOCATION_GOES_HERE placeholder with one • 3 About Me of the literal numeric values in the Location table. 4 Who I’d Like to Meet If this parameter is not defined, it will default to the • 5 Interests “About Me” section. 6 Music Your Title will appear in the subject line of a Bulletin or • 7 Movies Blog while the URL and Content will appear in the main 8 Television body. For all other targets (including Bulletins), the main 9 Books body will contain the Title, URL, and Content. 10 Heroes
  • 2. Samples Here is a sample PTM link that posts an image to the user’s “About Me” section. Note the use of single quotes in the image tag in the content. Alternatively, they could’ve also used an escaped double quote (e.g. src=”http://www.photos.com/userimage.jpg”) <form id=quot;myspaceposttoquot; method=quot;postquot; action=quot;http://www.myspace.com/index.cfm?fuseaction=posttoquot; target=quot;_blankquot;> <input type=quot;hiddenquot; name=quot;tquot; value=quot;Photos from my summer tripquot; /> <input type=quot;hiddenquot; name=quot;cquot; value=quot;<p>Me at the park</p><img src=’http://www.photos.com/userimage.jpg’quot; /> <input type=quot;hiddenquot; name=quot;uquot; value=quot;http://www.photos.com/userimage.jpgquot; /> <input type=quot;hiddenquot; name=quot;lquot; value=quot; quot; /> <a href=quot;#quot; onclick=quot;document.getElementById('myspacepostto').submit();return false;quot;> <img src=quot;http://cms.myspacecdn.com/cms/post_myspace_icon.gifquot; border=quot;0quot; alt=quot;Post to MySpace!quot; /> Share on MySpace! </a> </form> Here is a sample PTM link that posts a simple link back to a news article that will be placed in the user’s “Heroes” section. <form id=quot;myspaceposttoquot; method=quot;postquot; action=quot;http://www.myspace.com/index.cfm?fuseaction=posttoquot; target=quot;_blankquot;> <input type=quot;hiddenquot; name=quot;tquot; value=quot;An Important News Article Titlequot; /> <input type=quot;hiddenquot; name=quot;cquot; value=quot;quot; /> <input type=quot;hiddenquot; name=quot;uquot; value=quot;http://www.newssite.com/article.php?id=123quot; /> <input type=quot;hiddenquot; name=quot;lquot; value=quot;10quot; /> <a href=quot;#quot; onclick=quot;document.getElementById('myspacepostto').submit();return false;quot;> <img src=quot;http://cms.myspacecdn.com/cms/post_myspace_icon.gifquot; border=quot;0quot; alt=quot;Post to MySpace!quot; /> Share on MySpace! </a> </form> Implementing PTM as a Get Link Alternatively, PTM can be implemented as a Get-based hyperlink by copying the following code into your page where you want the PTM link to appear. <script type=quot;text/javascriptquot;> function GetThis(T, C, U, L) { var targetUrl = 'http://www.myspace.com/index.cfm?fuseaction=postto&' + 't=' + encodeURIComponent(T) + '&c=' + encodeURIComponent(C) + '&u=' + encodeURIComponent(U) + '&l=' + L; window.open(targetUrl); } </script> <a href=quot;javascript:GetThis('TITLE_GOES_HERE',’CONTENT_GOES_HERE’, 'URL_GOES_HERE', ‘LOCATION_GOES_HERE’)quot;> <img src=quot;http://cms.myspacecdn.com/cms/post_myspace_icon.gifquot; border=quot;0quot; alt=quot;Post to MySpace!quot; /> Share on MySpace! </a> Once you’ve cut and paste the code, replace the parameter placeholders as you would for the standard implementation. When implemented as a Get-based hyperlink the Title parameter is limited to 60 characters • while the Content parameter is limited to 1000 characters. Be sure to leave the surrounding quotes while escaping any single quotes that appear • within your post (e.g. <a href=quot;javascript:GetThis('That/’s What She Said!',’’, 'http://test.com', ‘’)quot;>).