Vinnie B.
08-11-2009, 11:52 AM
I'm sure many of us also play Mafia Wars, by Zynga, and already have 500 or more friends who play that game - some subset of which also already play (or have tried) Mobsters2:Vendetta.
I'm not looking to add more friends. I've got plenty.
I'm looking to figure out which of my *existing* friends already play M2:V, and add them automagically.
For Mafia Wars, Sergey Shushunov has written a little 'bookmarklet' that uses javascript to grab the userIDs of the people who are friends, but not in your mafia, from your "My Mafia" page in Mafia Wars. It then builds a list of those members, and makes an attempt to "force add" each one to your mafia by building a URL identical to that which you'd click if the person had put their MW 'add me' link in their status - just like you can do for Mobsters 2. When it finds a friend who is not in your mafia, but who plays MW, it adds you to each other's mafias, and you both get a message indicating that fact.
So, my question is this:
Are there any javascript wizards out there that'd like to help me puzzle out how to do this for Mobsters 2?
ToDo: Figure out the Mobsters2:Vendetta equivalents of these variables:
recruit_url='http://apps.facebook.com/inthemafia/remote/html_server.php?xw_controller=recruit&xw_action=view';
mw_url='http://apps.facebook.com/inthemafia/remote/html_server.php?xw_controller=stats&xw_action=view&user=';
fb_url='http://www.facebook.com/profile.php?id=';
total_friends;
xpathid='//input[@name="fb_sig_user"]';
myid=document.evaluate(xpathid,document,null,XPath Result.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotIt em(0).value;
add_url1='http://mwfb.zynga.com/mwfb/status_invite.php?from=';
add_url2='&fb_sig_added=1&fb_sig_user='+myid;
Thanks in advance for the digging!
I'm not looking to add more friends. I've got plenty.
I'm looking to figure out which of my *existing* friends already play M2:V, and add them automagically.
For Mafia Wars, Sergey Shushunov has written a little 'bookmarklet' that uses javascript to grab the userIDs of the people who are friends, but not in your mafia, from your "My Mafia" page in Mafia Wars. It then builds a list of those members, and makes an attempt to "force add" each one to your mafia by building a URL identical to that which you'd click if the person had put their MW 'add me' link in their status - just like you can do for Mobsters 2. When it finds a friend who is not in your mafia, but who plays MW, it adds you to each other's mafias, and you both get a message indicating that fact.
So, my question is this:
Are there any javascript wizards out there that'd like to help me puzzle out how to do this for Mobsters 2?
ToDo: Figure out the Mobsters2:Vendetta equivalents of these variables:
recruit_url='http://apps.facebook.com/inthemafia/remote/html_server.php?xw_controller=recruit&xw_action=view';
mw_url='http://apps.facebook.com/inthemafia/remote/html_server.php?xw_controller=stats&xw_action=view&user=';
fb_url='http://www.facebook.com/profile.php?id=';
total_friends;
xpathid='//input[@name="fb_sig_user"]';
myid=document.evaluate(xpathid,document,null,XPath Result.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotIt em(0).value;
add_url1='http://mwfb.zynga.com/mwfb/status_invite.php?from=';
add_url2='&fb_sig_added=1&fb_sig_user='+myid;
Thanks in advance for the digging!