Is it MySpace Voodoo?
July 6, 2008 9:43 AM   Subscribe

How can I pull the data from a MySpace profile to include in flash or other custom layouts?

One of the coolest things about LoveMyFlash is that their layouts automagically pull the data a user has entered in to their "About Me," "Who I'd Like to Meet," interest lists, etc.

How do they do it?

Obviously they're isolating each "blurb" and pulling it in to the swf. I could do the "pulling it in to the swf" part... if I knew *where* to get the blurbs. That's the part I just can't seem to figure out.

Is there a way to make a database query directly? This seems like a big security hole... but then again it's MySpace we're talking about here...

Is there a way to go to each blurb or section as an individual HTML page? That seems like the most direct route.

Or are they using some regex voodoo in the Flash script to seek out the words "About Me" then include everything until the "Who I'd Like to Meet." This seems like it would be doable... but complicated... especially since regex is not my strong suit... nor are the black arts.

Anyone have any clues?
posted by vertigo25 to Computers & Internet (6 answers total) 1 user marked this as a favorite
 
Without desconstructing the actionscript behind it all, I'd wager its either using regular expressions on the returned HTML, or is using XPath expressions on same HTML.

If I remember, I'll run one through a decompiler at work.
posted by Smoosh Faced Lion at 10:01 AM on July 6, 2008


Best answer: Maybe they're using the MySpace Data Availability APIs.
posted by rhizome at 10:34 AM on July 6, 2008


Response by poster: rhizome (awesome handle, BTW): I don't think they are (when you set up one of their templates, you aren't asked to grant permission to LoveMFlash), but that dev site was something I was not aware of and will be incredibly useful. Thanks!
posted by vertigo25 at 10:47 AM on July 6, 2008


many languages a myspace implementation (official or homebrew). I can't speak to Flash, since it's not a language ( noone need try and say "but actionscript is a language" (it's not)).

But for example:

perl: http://search.cpan.org/~grantg/WWW-Myspace-0.82/lib/WWW/Myspace.pm#SYNOPSIS

google/ruby: http://code.google.com/p/rb-myspace/ (you need a google account to see the joke)

php: as far as I can tell, all php programmers use the direct myspace api as accessed via cURL (see below).

MySpace: http://developer.myspace.com/Community/ Myspace has actually released their own web API (like (yicky) SOAP).


No you can't query the myspace database directly. As lame and broken as myspace is, it's freakin huge, and they'd never give you access like that. Not because it's a security risk, but because it's just technologically impossible to give like a 1,000,000 people direct database access. (well without millions of dollars (extra) for servers)
posted by judge.mentok.the.mindtaker at 10:52 AM on July 6, 2008


scooped by rhizome (who has given the "most correct" answer)
posted by judge.mentok.the.mindtaker at 10:53 AM on July 6, 2008


They don't have to query the myspace database directly, just get the page and then deconstruct it to retrieve the data.

I'd guess that is what they are doing.
posted by pedalpete at 8:03 PM on July 6, 2008


« Older Where can I advertise an improv comedy show?   |   RSS to Audio in Automator Newer »
This thread is closed to new comments.