• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/WWW/H29-Jan-2009-10,2563,412

samples/H29-Jan-2009-848367

scripts/H29-Jan-2009-888305

t/H29-Jan-2009-1,782977

ChangesH A D29-Jan-200986.9 KiB1,6591,548

MANIFESTH A D29-Jan-20091.5 KiB7877

META.ymlH A D29-Jan-2009863 3231

Makefile.PLH A D21-Aug-20081.9 KiB4631

READMEH A D19-Jun-20087.6 KiB225165

date.patchH A D15-Aug-20081.9 KiB6553

mechanize.patchH A D17-Aug-20082.5 KiB5441

README

1WWW::Myspace - Access MySpace.com from Perl scripts
2
3WARNING
4
5March 2007: Using WWW::Myspace for commenting, messaging, or adding
6friends will probably get your Myspace account deleted or disabled.
7
8
9WWW::Myspace.pm provides methods to access myspace.com accounts and functions
10automatically. It provides a simple interface for scripts to log in,
11access lists of friends, scan user's profiles, retreive profile
12data, and post comments.
13
14Example:
15
16    use WWW::Myspace;
17    my $myspace = WWW::Myspace->new ($account, $password);
18        OR
19    my $myspace = new WWW::Myspace; # Prompts for email and password
20
21    my ( @friends ) = $myspace->get_friends();
22
23
24PREREQUESITES
25
26    (Makefile.PL will always have the the current list. This was copied from there Jun 6, 2007)
27
28        'Test::More' => 0,
29        'Spiffy' => 0.24,
30        'YAML' => 0.39,
31        'File::Spec::Functions' => 0, # Note: Forces File::Spec 0.7 or later.
32        'Contextual::Return'    => 0, # For send_friend_request method
33        'Locale::SubCountry'    => 0, # FriendAdder.pm, cool_new_people
34        'WWW::Mechanize'        => 1.20, # Myspace.pm
35        'Time::Local'			=> 0, # Myspace.pm - last_login method
36        'Crypt::SSLeay'			=> 0.53, # WWW::Mechanize, for SSL access to myspace.com
37        'Config::General'       => 0, # MyBase.pm
38        'Params::Validate'      => 0, # MyBase.pm
39
40
41Each of them has a list of dependencies also.
42
43If you don't have XML::Parser installed, you may need to manually install expat:
44http://sourceforge.net/projects/expat/
45Just try installing and if the install fails look through the messages
46and see if it says you need expat.
47
48On MacOS X you'll need to install the developer tools from your
49Tiger install DVD or download them from http://developer.apple.com
50or nothing will install and you'll get errors about missing CORE files).
51(I haven't tested this on pre-Tiger MacOS, but it should work with
52those developer tools also).
53
54INSTALLATION
55
56Installing using the cpan command-line tool is the easiest
57as it will install the dependencies for you.
58
59cpan install WWW::Myspace
60
61or
62
63sudo cpan install WWW::Myspace
64
65Good general advice for installing any CPAN module:
66If a module fails to install:
67- Starting at the top, scan the copious output cpan will create
68- When you see a module has failed to install:
69  - cd into the module's directory ( hint: cd ~/.cpan/build ; ls )
70  - Read the README for the module and install it manually. You'll
71    see the specific errors it's having there.
72  - Once it's installed, run your cpan install command again.
73
74If you don't configure cpan to use "sudo make install"
75(and you should, for which you'll need cpan 1.83), you'll probably
76want to run the cpan command as root or run "sudo cpan". man cpan
77for more info.
78
79
80To install this module manually, run the following commands:
81
82    perl Makefile.PL
83    make
84    make test
85    sudo make install  # Or su root ; make install
86
87
88The distribution also installs the following convenience modules:
89WWW::Myspace::Comment
90WWW::Myspace::FriendChanges
91WWW::Myspace::Message
92
93Also be sure to check out:
94WWW::Myspace::FriendAdder
95WWW::Myspace::Data
96which are available as separate modules (these used to be included
97but were separated out on 6/29/2007 to make the base module lighter).
98
99The distribution also installs the following handy scripts:
100approve_friends
101comment_myspace
102message_group
103
104(add_friends was moved to WWW::Myspace::FriendAdder)
105
106These are scripts I use, and decided to include in the
107distribution in case they're handy, since they're the most common
108uses for the module, and they're a bit more robust and friendly
109than just using the methods in the module themselves.
110
111
112TEST SUITE
113
114WWW::Myspace accesses a web site, which by nature may change.
115Such change may break functions in this module.
116The test suite (run during cpan installation or when you type
117"make test") runs an extensive battery of tests on all methods
118against the myspace site. This has a few effects:
1191) It makes sure the module works on your system.
1202) It makes sure that the module works with the current version
121   of the myspace site.
1223) If the site changes, or has problems, tests may fail even though
123   overall the module will work.
124My approach to programming is that the module should be robust
125enough to handle the changes in the myspace site, so if condition
1263 occurs, the module needs beefing up.
127
128Note that you can re-run the test suite at any time. Keep a copy
129of the distribution (hint: cd ~/.cpan/build/WWW-Myspace* ) and
130run:
131    perl Makefile.PL
132    make test
133
134This is handy if you find that something in one of your scripts
135stops working and you're wondering if something changed that broke
136WWW::Myspace. If the tests pass, it's probably your script. If not,
137there'll probably be an update coming soon (make sure you have
138the latest version, of course - just re-run the cpan command).
139
140IMPORTANT NOTE ABOUT TESTS: As of version 0.40, you can run the full
141test suite against your own accounts.  To do so, place a config
142file (copy/paste this and change the values) in
143~/.www-myspace/test_config.yaml:
144
145---
146acct1:
147  friend_id: 12345
148  username: myspace_login_email_address
149  password: myspace_login_password
150  user_name: Username (as it appears in "Hello, Username" when you log in.)
151acct2:
152  friend_id:
153  username:
154  password:
155  user_name:
156test_group: 100009984
157# If fulltest is set to 1, tests will post bulletins (and possibly other similar
158# "destructive" or "public" things in the future).  If it's set to 0 (the default)
159# bulletin won't actually post a bulletin, but will stop short of the final
160# confirmation.  This is probably fine unless you're actually working on those
161# methods.
162fulltest: 0
163
164
165See t/config.yaml for an example file (but lacking "username" and "password").
166
167This establishes test data for 2 accounts, "acct1", and "acct2".  You provide
168the login info, friendID, and display name for each account. The test
169scripts then log into each account and test the module's methods using them.
170They'll post comments back and forth, send a message or two, and delete and
171add each other as friends.  It should be safe to run on an active account,
172but if you feel nervous, set up a couple dummy accounts.
173
174NOTE THAT acct2 MUST BE A PERSONAL (not a band) ACCOUNT, or the is_band
175test will fail, causing your tests to fail.
176
177
178HOW TO SUBMIT A PATCH
179
180To submit a patch for a new feature or a bug fix, please observe the following.
181Doing so will allow me to implement your patch quickly.  Not doing so may
182delay its implementation or prevent me from implementing your patch at all.
183
184 - Download the newest development version from SVN.
185   The command to use is here:
186   http://sourceforge.net/svn/?group_id=163042
187   (Or see http://sourceforge.net/projects/www-myspace)
188 - Apply your changes to that version.
189 - Create a unified or context diff of the changed file(s):
190   diff -u original_file.pm your_file.pm
191 - Email the output to bug-www-myspace at rt.cpan.org, or go to the
192   CPAN RT web site (see below) and submit it there.
193
194I will apply your patch and run the tests on it.
195
196
197SUPPORT AND DOCUMENTATION
198
199After installing, you can find documentation for this module with
200the perldoc command.
201
202  perldoc WWW::Myspace
203
204You can also look for information at:
205
206    Search CPAN
207        http://search.cpan.org/dist/WWW-Myspace
208
209    CPAN Request Tracker:
210        http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Myspace
211
212    AnnoCPAN, annotated CPAN documentation:
213        http://annocpan.org/dist/WWW-Myspace
214
215    CPAN Ratings:
216        http://cpanratings.perl.org/d/WWW-Myspace
217
218COPYRIGHT AND LICENCE
219
220This module copyright (C) 2005-2006 Grant Grueninger except
221FriendAdder.pm, (c) 2006 Olaf Alders.
222
223This program is free software; you can redistribute it and/or modify it
224under the same terms as Perl itself.
225