Freelancer.com

Go Back   Warrior Forum - The #1 Internet Marketing Forum & Marketplace > The Warrior Forum > Main Internet Marketing Discussion Forum
Register Blogs Social Groups Advertise with usHelp Desk

Reply
LinkBack Thread Tools
Unread 4th May 2010, 09:47 AM   #1
Senior Warrior Member
 
greenovni's Avatar
 
Join Date: 2007
Location: Florida
Posts: 1,087
Blog Entries: 2
Thanks: 20
Thanked 126 Times in 62 Posts
Default Unfollow Twitter Script

Hello everyone, its been a while since I stopped by here and wanted to give you this little gift.

A lot of you have multiple twitter accounts for your niches and follow people in order to gain people following you back. Unfortunately with twitter, you can only follow up to 2,000 people at any one time.

Unfollowing by hand can be a real pain in the butt so here is a little PHP script that you can upload to your server and run every time you want to unfollow a ton of people at once

Quote:
<?php
// Set username and password
$username = 'username';
$password = 'password';

// The twitter API address
$url = 'http://www.twitter.com/friends/ids.xml';
// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_GET, 1);
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");

$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer)) {
echo 'Error';
} else {
echo '<h1>Success Connate</h1><hr>';
}
// xml to array
//
//echo $buffer ;
$xml = simplexml_load_string("$buffer");
foreach ($xml->children() as $child)
{
echo " $child ";
// The twitter API address
$url_2 = "http://twitter.com/friendships/destroy.xml?user_id=$child";
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url_2");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
$buffer_2 = curl_exec($curl_handle);
curl_close($curl_handle);
// check for success or failure
if (empty($buffer_2)) {
echo 'Error';
} else {
echo 'Go to hell<br/><hr>';
}

}
?>
Your server would need CURL in order to run this script.

Directions:

1. copy code into a txt file
2. Set your twitter user name and password
3. Save as whatever you want .php
4. upload to your web host
5. visit http://yourdomain.com/whateverscriptname.php

greenovni is offline   Reply With Quote
Unread 4th May 2010, 10:22 AM   #2
Suzanne
War Room Member
 
sbucciarel's Avatar
 
Join Date: 2007
Location: Virginia, USA.
Posts: 16,435
Blog Entries: 1
Thanks: 3,195
Thanked 9,532 Times in 5,138 Posts
Default Re: Unfollow Twitter Script

There's plenty of services around that allow you to mass unfollow, but mass unfollowing will most likely get your Twitter acct banned.

Here's a techcrunch articles that shows Twitter's TOS regarding automation and bulk unfollows.

6 Million Unfollows Later, Twitter Moves To Silence ManageTwitter

Twitter Karma also received the same instructions from Twitter

sbucciarel is offline   Reply With Quote
Unread 4th May 2010, 10:37 AM   #3
KING-WARRIOR
 
majidmaskat's Avatar
 
Join Date: 2009
Location: london
Posts: 184
Thanks: 4
Thanked 12 Times in 12 Posts
Default Re: Unfollow Twitter Script

well sorry to say this but, there are other website which offer this service fairly rather qucikly. So much appreaciated for the code, but it is already out there
majidmaskat is offline   Reply With Quote
Unread 4th May 2010, 06:43 PM   #4
Senior Warrior Member
 
greenovni's Avatar
 
Join Date: 2007
Location: Florida
Posts: 1,087
Blog Entries: 2
Thanks: 20
Thanked 126 Times in 62 Posts
Default Re: Unfollow Twitter Script

There might be someone out there that would need the code, at least that is what I thought

greenovni is offline   Reply With Quote
Reply

  Warrior Forum - The #1 Internet Marketing Forum & Marketplace > The Warrior Forum > Main Internet Marketing Discussion Forum

Bookmarks

Tags
script, twitter, unfollow

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 06:24 AM.