What Exactly Is Pluck Passing Around?
If you look at what’s being output in both the console and the DOM for your sites, you’ll see that Pluck is carrying around a lot more about the user than the avatar and persona link.
Here’s a bit of jQuery that helps dive into some of this data:
$(window).load(function () {
// run code
for(var i=frames.length-1; i>=0; i–){
var frame = frames[i];
if (frame.location.toString().match(/Direct\/Process\?jsonRequest/)) {
i = -1;
eval(’pluckData=’+unescape(frame.document.getElementsByTagName(’body’)[0].innerHTML));
}
}
var responses = pluckData.ResponseBatch.Responses;
for(var i=responses.length-1; i>=0; i–){
if (responses[i].User) {
var userKey = responses[i].User.UserKey.Key;
i = -1;
}
}
});
In this particular case I’m pulling out the UserKey. [You might want to also read: http://980media.com/?p=239] Find out more about what’s available using Firebug’s console and looking at the response objects.
Here’s a snapshot of what appears to be available on the user
- Age
- Birthday
- Location
- Custom Answers
- Last Updated
- Number of messages
- Number of Friends
- Number of Pending Friends
- Number of Recommendations (times the user has been recommended)
- User
My first thoughts on how to use this information:
- It would be nice to have the number of messages and pending friends appear beneath your avatar.
- It might stroke the user’s ego to have the number of times they’ve been recommended.
- A Happy Birthday message (cute, I know)