-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get snap to send! #63
Comments
This could be a header issue. |
So I fixed that up and i tried sending a snapchat. It logged me out of snapchat which I'm assuming is correct, but then when I logged back in I don't see anything sent. I also tried it with uploading a story and I don't see anything I've uploaded. |
@Dgameman1 How did you fix? I am still getting issues with updated headers. |
@Spurlex I actually did not get it to work yet. Nothing is being sent at the moment =/ |
@Dgameman1 Could you show me a sample of your code please, Also @Spurlex could you describe to me the issues you are having? |
I'm guessing you're using the API on the server, Does your code work locally? |
@hako Neither one of these seem to be doing anything other than logging me out
|
@Dgameman1 require_once('src/snapchat.php'); // Log in: // Upload a snap and send it to me for 8 seconds: $id = $snapchat->upload( // Log out: ?> |
@Snowlav I just commented the send private snapchat just to show that I'm trying to only use one. That doesn't seem to work either lol |
"Neither one of these seem to be doing anything other than logging me out" |
@Snowlav Lol i wish it was that easy :( |
Uh any ideas guys ?:O |
I'm having a similar issue. Without digging a little deeper, I can't guarantee this, but my snaps won't upload... However, if they do upload, they send perfectly. When I dug more deeply, my POST function inside snapchat_agent would be returning false due to the CURL headers coming back as 401 Unauthorized. |
@KyleBoyer How would you know that they send perfectly if they don't upload? |
The upload endpoint responds differently with the change of client version. I've just documented the latest version of the /ph/upload : /ph/uploadDescriptionUsed to upload media to the server Request
ResponseNo content. |
So what do you suggest I do? Just wait till it gets fixed? |
You could try participating in the development of a solution, I've gave On 02/01/2015 08:25, Dgameman1 wrote:
|
I just adjusted my code and tried those parameters with that endpoint, and I still get back a 401 Unauthorized response. The only thing that I could've screwed up with, was the features_map... I tried leaving that null. |
Got it working with a few modifications, here is my testing code : http://files.lab.cuonic.com/NWI2MzJ |
@cuonic Page not found :O |
@Dgameman1 Page not found for the download, when uploading a snap, when sending the snap ? |
@cuonic http://files.lab.cuonic.com/NWI2MzJ says 404 Not Found |
@Dgameman1 Sorry about that, seems to work for other people though. Try this : http://dev.cuonic.com/SnapUpload.zip |
Hmm that's really strange. Still 404 |
And it worked ... @cuonic Very weird. |
@Dgameman1 Check your DNS servers they don't see very... up to date :) In upload.php you just need to add your Snapchat username and password for it to work. |
@cuonic http://i.imgur.com/txR6m7H.png :( I promise I'm not retarded |
I've got exactly the same code and it's working good. If you're getting "Error encountered" then it's good news, it means that the upload was successful, so it's just the "sending" of the snap that screws up. Use the following code to debug the sending :
And paste here what you get back in the tags |
Um, now when I Just go to the page, i get this error |
Well that's good because now we know the problem. Either the file you are trying to send is not valid "media", try starting off by sending a small JPEG image, don't try videos / large images just yet. If not the the media type is invalid, try replacing |
@cuonic I didn't actually fill out the form or anything. I just went to the page and it gave me that error =O Like I didn't send an image yet |
Oh ok it's detecting a POST request by fetching the page... Oh dear. Replace Line 3 |
I changed the code and the same thing happens when i go to the page without posting lol |
Damn, Ajax won't work for the file upload. How about changing line 3 to |
@cuonic same error =/ |
The original code works for me as well as all the modifications. |
What browser are you using ? What web server ? |
@cuonic I'm using google chrome and it's currently hosted up online |
Try running it locally with a WAMP / LAMP server |
Okay cool! So, this time nothing happened and the page loaded fine. I fill everything out and I get this |
This is not working very well at all for you. Are you sure you are using the provided snapchat.php and snapchat_agent.php ? Try using the following file as |
@cuonic This does not make any sense. I legit used the file you sent me to download but apparently the snapchat.php you just sent me to use on github is different. so I used that and now the error i get is this.. |
Good, well something is screwing up with the login. Use the following as |
Still get the same No Authentication Details =/ Just want to say thank you so much btw |
But the thing is, it still logs me out :o |
Ok try adding the following :
just after And paste the output here |
There's the problem :) Try doing a Google search for that one |
@Dgameman1 : Curl requires an absolute path for the certificate file apparently, so you need to change line 318 of |
Try the following line actually : |
@cuonic http://i.imgur.com/AtMMrBB.png |
@Dgameman1 Ok well that's a good start, login was successful via the new endpoint. You can remove the |
@cuonic Using this new endpoint, I've been able to send people images, just not post them to the story now... Is there a new endpoint for posting stories? |
@KyleBoyer : Watching the Android application's network traffic when posting a story it doesn't seem to use |
@cuonic You are god's gift to man kind. Thank you so much. But now how do you suggest we fix the post while refreshing when it's hosted up online? EDIT: I got everything to work. ILY |
@Dgameman1 Glad you got everything working, happy to help :) |
@cuonic @Dgameman1 How to you getSnaps using the new API? Is it hidden in the conversations_response? |
For whatever reason, nothing is being sent. And when I tried using the test I get an error saying
"Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /snap/tests/phpSnapchatTest.php on line 3"
The text was updated successfully, but these errors were encountered: