Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Nothing when running getUnconfirmedFriends() #166

Closed
emiliobasualdo opened this issue Aug 1, 2015 · 3 comments
Closed

Nothing when running getUnconfirmedFriends() #166

emiliobasualdo opened this issue Aug 1, 2015 · 3 comments

Comments

@emiliobasualdo
Copy link
Contributor

Litterary no output when running getUnconfirmedFriends(), no echo nor print_r.
Friends are not added either. Any idea why?
When debug set to true the output is extremely extensive.
Debug: https://drive.google.com/file/d/0ByEyXdtjcSU0VWxDelBaT3E5bDA/view?usp=sharing

<?php

include_once("../src/snapchat.php");

//////////// CONFIG ////////////
$username = "*****"; // Your snapchat username
$password = "*****"; // Your snapchat password
$gEmail   = "*****"; // Gmail account
$gPasswd  = "****"; // Gmail account password
$debug = false; // 
////////////////////////////////
unlink("/Users/Pilo/Desktop/SC-API-master/src/authData/auth-sasstv.dat");

// Login
$snapchat = new Snapchat($username, $gEmail, $gPasswd, $debug);
$snapchat->login($password);

// Get unconfirmed friends
$unconfirmed = $snapchat->getUnconfirmedFriends();

// Add them
if (!is_null($unconfirmed))
{
     print_r($unconfirmed);
     foreach($unconfirmed as $friend)
           $snapchat->addFriendBack($friend);
}

$snapchat->closeAppEvent();
?>

Made it work different approach though:

$All =$snapchat->getFriends();
$friandnot =$snapchat->getAddedFriends();
//compares
$Frienddiff = array_diff($friandnot, $All);
//friends add
if ((count($Frienddiff)) >0 ) {
    foreach ($Frienddiff as &$value) {
        //adds
        $frienduser = "$value";
        $snapchat->addFriend($frienduser);  
    }
}
@mgp25
Copy link
Owner

mgp25 commented Aug 4, 2015

@LanchaBasualdo i'll check it this week.

Thanks for reporting

Regards

@mgp25 mgp25 closed this as completed in 2bbb454 Aug 17, 2015
@sallaben
Copy link
Contributor

Careful, there are passwords in there @LanchaBasualdo

@emiliobasualdo
Copy link
Contributor Author

I have changed them

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants