Closed HW73 closed 9 years ago
There is a bug in Casper's gateway, it works, but you will need to try to login many times. For example, i tried 10 times til i succeed.
Anyway, it will be fixed, but for now just try (many times) to login
Yeah, sorry. I'm in the process of testing some changes to the internal code, because the internal bytes I've been using don't work properly anymore.
I've implemented some of Google's internal GPU code, which appears to have fixed the issue in Casper, and am still in the process of testing this on the servers.
Once I see it works properly, I'll push it to the live servers, and logins will work for you again.
Until then, there's not much any of you can do sorry.
As long as it works that's fine :) Thanks for the help guys!
@liamcottle, thanks for all the work you're doing. I appreciate it
I just tried again and got this crazy error, I'll set a crontab up to try every 5 minutes.
(
[message] => Oh no! Your login temporarily failed, so please try again later. If your login continues to fail, please visit https://support.snapchat.com/a/failed-login :)
[status] => -103
[logged] =>
Yeah, that issue is caused by receiving an invalid attestation value from the Google servers. The invalid attestation is caused by the internal byte arrays being wrong in my system.
I'll hopefully have the fix out in an hour or so.
I wouldn't suggest setting a cron tab for every 5 minutes, as this will get your IP banned, by making too many failed logins.
All servers have been updated with the new code.
Let me know if that solves the attestation issue for you.
Cheers.
That's great Liam, i've just tested it and it works well. Just having a small problem where the users aren't being sent a message. Do you know how to save the images into a folder? I'm going to try get them to post to instagram too.
// Login
$tmpPath = '/tmp/';
$snapchat = new Snapchat($username, $gEmail, $gPasswd, $debug);
$snapchat->login($password);
if($addback == true)
{
$unconfirmed = $snapchat->getUnconfirmedFriends();
if (!is_null($unconfirmed))
{
print_r($unconfirmed);
foreach($unconfirmed as $friend)
$snapchat->addFriendBack($friend);
}
}
$snaps = $snapchat->getSnaps();
if (!is_null($snaps))
{
foreach($snaps as $snap)
{
echo "Processing SNAP ID [" . $snap->id . "]<br />";
$snapchat->writeToFile('../src/snaps/' . $snap->id, $snapchat->getMedia($snap->id));
$tmpFilePath = $tmpPath . $snap->id;
file_put_contents($tmpFilePath, $snapchat->getMedia($snap->id));
$snapchat->setStory($tmpFilePath, $snap->time);
$snapchat->markSnapViewed($snap->id);
unlink($tmpFilePath);
$snapchat->sendMessage($snap->sender, "Your snap has been processed! Thank you for submitting & Please tell your friends!");
echo "Processed!<br /><br />";
}
}
$snapchat->closeAppEvent();
?>
@HW73 read the wiki and example files
$Snapchat->getSnaps(true);
@mgp25 @LanchaBasualdo thanks guys, I had a look and tried it out but the bot stopped working once I added that line in. Do I need show it where to save the snaps to?
you can, but no. Post your code, and debug.
I'm quite the noob when it comes to those things. I can't find any way to get the debug code, could you point me in the right direction please?
I've found an error log, probably not the right log
Don't publish issues if you lack abilities, joel and mgp will get angry. Send me an email i'll show you. Never the less. Please read the wiki en the main page of this library, everything is explained there.
Sorry guys, I've just dived in at the deep end trying to learn a few things. Thanks @LanchaBasualdo
@HW73 It's okay to learn things, we all have been begginners, but just because of that you need to read more.
The very first step is to read the whole wiki:https://github.com/mgp25/SC-API/wiki/Snap-API-Documentation
In the wiki you will find everything you need to know, and most of the things are explained. Once you know the theory you can go to the experimental part, so we prepared example files you can play with to test: https://github.com/mgp25/SC-API/tree/master/examples
If you have any other issue not tracked yet or not explained in the wiki its okay to ask, but not PHP questions, if you have questions about how to code something, the best thing you could do is google it or search it in PHP Manual: https://secure.php.net/manual/en/index.php
So this comment https://github.com/mgp25/SC-API/issues/207#issuecomment-141463717 could be answered just by reading the wiki: https://github.com/mgp25/SC-API/wiki/Snap-API-Documentation#logging-in
Regards
@liamcottle @mgp25 are we still down or am I the only one with the attestation issue?
Attestation API should be working now. I just tested the PHP lib myself, and had to delete my src/authData/auth-*.dat
file for Login to work.
I'm not too sure what's going on. I've installed a fresh copy and moved to a server in my country to prevent being blocked by snapchat. Is anyone familiar with what I might be doing wrong?