I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-04-11 21:48:44-07 by sbrady
Modify Profile
Is there anyway to modify my profile via WWW::Myspace ?? Any help is greatly appreciated! Thanks! - Sean
Direct Responses: 2153 | Write a response
Posted on 2006-04-12 07:43:33-07 by grantg in response to 2151
Re: Modify Profile
No way to modify your profile via WWW::Myspace yet. If you know Perl and would like to help write it, let me know. :) Grant
Direct Responses: 2155 | Write a response
Posted on 2006-04-13 00:50:30-07 by sbrady in response to 2153
Re: Modify Profile
Hello Grant. Okay, I've got it working.... here's the code I'm using.... it needs to be made more generic of course.... but I thought I'd send it to you anyhow.... you can either throw it in and modify it.... or let me know, and I'll try to get to it! Oh, and right now it only modifies the about me section, but of course that can be generisized... just had to get it together quickly for a single purpose app. Thanks - Sean
## follow the Edit Profile link $mech->get("http://editprofile.myspace.com/index.cfm?fuseaction=profile.interests"); ## submit edit interests form my $edit_interest_fields = { interestLabel => 'aboutme' }; _submit_form(2, $edit_interest_fields); ## submit edit interests preview form my $edit_preview_fields = { interestLabel => 'aboutme', interest => $content }; _submit_form(2, $edit_preview_fields); ## final submit my $edit_final_fields = { interestLabel => 'aboutme', interest => $content }; _submit_form(2, $edit_final_fields); return 1; } sub _submit_form { my ($form_number, $fields) = @_; $mech->form_number($form_number); $mech->set_fields(%{$fields}); $mech->current_form; my $result = $mech->submit(); if ($result->content() =~ /\berror\b/i) {die new Sink::Error("MySpace", "ERROR")} return 1; }
Direct Responses: 2156 | 2160 | Write a response
Posted on 2006-04-13 03:03:08-07 by jimmy in response to 2155
Re: Modify Profile
awesome job cant wait to see this integrated somwhow!!
Direct Responses: Write a response
Posted on 2006-04-13 16:35:50-07 by grantg in response to 2155
Re: Modify Profile
Thanks Sean, that's great. I'm finishing up a substantial re-org of the module and the tests, hopefully I'll be able to integrate this soon. - Grant
Direct Responses: Write a response