Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <?php
- require_once 'twitteroauth.php';
- $oTwitter = new TwitterOAuth
- (
- 'cEW7mWiLjxuVU17CskZYTZFPd',
- 'ikPZ55Cx03MOLDHr3qNL2EWgJ9vkqTle7NwZcbeppB5ItyZoil',
- '138495038-m5BM4L9W3wqKPBEC6cm7qo7Xr1CyLOh67HqEo1TJ',
- '65HDY2GLDV9Yx4WX8JqDde36SdfjeoxkmGjlK1L9RSwvR');
- $aFollowing = $oTwitter->get('friends/ids');
- $aFollowing = $aFollowing->ids;
- $aFollowers = $oTwitter->get('followers/ids');
- $aFollowers = $aFollowers->ids;
- $i=1;
- foreach( $aFollowing as $iFollowing )
- {
- $isFollowing = in_array( $iFollowing, $aFollowers );
- echo "$iFollowing: ".( $isFollowing ? 'OK' : '!!!' )."<br/>";
- if( !$isFollowing )
- {
- $parameters = array( 'user_id' => $iFollowing );
- $status = $oTwitter->post('friendships/destroy', $parameters);
- }
- }
- ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement