Navigation Menu

Skip to content
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

Unable to post status update with a message containing exclamation mark #21

Open
boughtonp opened this issue Dec 15, 2014 · 24 comments
Open

Comments

@boughtonp
Copy link
Contributor

Posting "test message" works, but posting "test message!" results in:

{"errors":[{"message":"Could not authenticate you","code":32}]} 

Updated to latest code from GitHub master branch and it does the same thing.

Most of the results on the web suggest this is an encoding problem (it's not just exclamation mark that is affected, comma and other characters are too), but dumping the arguments to httpOAuthCall it looks like the URL is encoded, so not sure that's it.

Other search results suggest the request needs to be sent as "application/x-www-form-urlencoded" - the cfhttp is currently set to multipart (i.e. multipart/form-data), however if I turn multipart off it doesn't work at all (i.e. both "test" and "test!" fail with code 32).

Using the Twitter OAuth Tool, sending "test message!" is working (via curl) - but changing the status after generating the signing results will fail with code 32, so I'm guessing the status text is used to generate the nonce/signature (since they change on each request), but I can't see any obvious place in the monkehTweets code where this happens?

Any thoughts?

@enniob
Copy link

enniob commented Apr 9, 2015

Saw the same issue today when you try to post a tweet that contains !! on it.

@coldfumonkeh
Copy link
Owner

Thank you, I'll look into this ASAP.

@coldfumonkeh
Copy link
Owner

Still haven't had a chance to look into this yet (conference season) but will do ASAP

@coldfumonkeh
Copy link
Owner

Just ran some xUnit AND manual tests and it worked for me (I hate saying that).

See https://twitter.com/randomUser1000/status/589090661992898560 and https://twitter.com/randomUser1000/status/589090660344541186.

These were both sent using an instantiated monkehTweet object with the consumerKey, consumerSecret , oauthToken, oauthTokenSecret and userAccountName values provided for authentication.

I received no issues or status number responses that failed the tests. This is using the latest version of the library from the repository.

Can you try again and if you're getting the same results let me know how and what you're doing?

@enniob
Copy link

enniob commented Apr 29, 2015

Sorry for the delay, I pulled again from the github and it worked. Maybe something was wrong with the files I had.

Thanks for checking it out.

@itstrace
Copy link

itstrace commented Sep 3, 2015

Pulled fresh files from github today and get this issue as well - any thoughts how to resolve?

@coldfumonkeh
Copy link
Owner

I think it's a version issue with the API or something not being sent in the headers for any request other than a traditional GET. Others using various other language frameworks and wrappers have experienced the same issue. I will have a look over the next few days to resolve.

@coldfumonkeh coldfumonkeh reopened this Sep 3, 2015
@RosemaryONeill
Copy link

In addition to !, for me it happens with (, ), and *.

@coldfumonkeh
Copy link
Owner

Unable to replicate. Closing.

@MichaelMassalas
Copy link

Hello Matt,

I happened to use the library today and it seems that the issue persists. I tested it with ! and * but it could be other non-alphanumeric characters too.

Just to make sure that I did not do anything wrong, I tried posting with only alphanumeric characters and it worked fine, so it seems that I am not doing anything else wrong there that could cause the issue (but who knows?).

I tried contacting you via the IRC channel but I didn't find you online at that time. If you could join that IRC channel at some point during the day, I could show you a test case to help debugging the issue and solving it once and for all :)

Thank you!

@coldfumonkeh
Copy link
Owner

Hi @MichaelMassalas

Apologies for the late reply. I'm on IRC now (havent logged in for a while), and will have a look at the issue. Thank you for raising it again.

@coldfumonkeh coldfumonkeh reopened this Feb 17, 2017
@MichaelMassalas
Copy link

Hi @coldfumonkeh

Thank you for your reply. Is there any progress with regards to the issue?
I will try to stay logged in to IRC as long as I can, so if you see me online, ping me.

Thank you again.

@MichaelMassalas
Copy link

MichaelMassalas commented Apr 7, 2017

Hi @coldfumonkeh

I was wondering if there is any update on this issue. I am planning to integrate all my systems with Twitter in the near future and I would really love to use this framework.

I would appreciate any response so that I know whether fixing this any time soon is feasible or not.

Thank you!

@RosemaryONeill
Copy link

RosemaryONeill commented Apr 13, 2017 via email

@coldfumonkeh
Copy link
Owner

Hi @MichaelMassalas and @RosemaryONeill

I can't seem to replicate this issue. Unit tests I have with exclamation marks successfully post to Twitter. Can you send me a sample string of content you're having issues with? Many thanks

@RosemaryONeill
Copy link

RosemaryONeill commented Apr 13, 2017 via email

@coldfumonkeh
Copy link
Owner

Thanks @RosemaryONeill. More testing to come..

@RosemaryONeill
Copy link

RosemaryONeill commented Apr 13, 2017 via email

@coldfumonkeh
Copy link
Owner

There must be something wrong. I've just posted a test message from my random test account (the default message with exclamation mark) with no issues:

https://twitter.com/randomUser1000/status/852580554402914306

@RosemaryONeill
Copy link

RosemaryONeill commented Apr 13, 2017 via email

@coldfumonkeh
Copy link
Owner

Which CFML engine and version are you using?

@coldfumonkeh
Copy link
Owner

From investigation, other people using other libraries have had the same issue with special characters which needed encoding for submission to the API, but monkehTweets does that out of the box. I tested to make sure and set a urlencode before sending the params through to the authentication request method, and got a tweet that was double-encoded, so I know it's working fine without it:

https://twitter.com/randomUser1000/status/852580211220779008

@RosemaryONeill
Copy link

RosemaryONeill commented Apr 13, 2017 via email

@RosemaryONeill
Copy link

RosemaryONeill commented Apr 13, 2017 via email

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

No branches or pull requests

6 participants