-
Notifications
You must be signed in to change notification settings - Fork 30
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
Comments
Saw the same issue today when you try to post a tweet that contains !! on it. |
Thank you, I'll look into this ASAP. |
Still haven't had a chance to look into this yet (conference season) but will do ASAP |
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? |
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. |
Pulled fresh files from github today and get this issue as well - any thoughts how to resolve? |
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. |
In addition to !, for me it happens with (, ), and *. |
Unable to replicate. Closing. |
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! |
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. |
Thank you for your reply. Is there any progress with regards to the issue? Thank you again. |
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! |
I would also be interested in any update on this.
Thank you.
Rosemary
From: MichaelMassalas [mailto:[email protected]]
Sent: Friday, February 24, 2017 6:43 AM
To: coldfumonkeh/monkehTweets
Cc: RosemaryONeill; Comment
Subject: Re: [coldfumonkeh/monkehTweets] Unable to post status update with a message containing exclamation mark (#21)
Hi @coldfumonkeh <https://github.com/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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#21 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AEEaL1SVg1CcxGQO3pCCNMdD9vcpKy1zks5rfsJGgaJpZM4DIksH> . <https://github.com/notifications/beacon/AEEaL1okisdXFQYGiEPdYL03ALaOMPbaks5rfsJGgaJpZM4DIksH.gif>
|
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 |
Hi Matt,
It happens with the simplest text. If I add an exclamation point,
parentheses, or asterisk to any sentence, Twitter returns code 32, 'could
not authenticate you'. It works perfectly if I do not include any of these
characters.
Even when I test it using your post.cfm template, Twitter returns an error
if I keep the exclamation point in the message. Could it be something with
my Twitter app?
Rosemary
…On Thu, Apr 13, 2017 at 1:17 PM, Matt Gifford ***@***.***> wrote:
Hi @MichaelMassalas <https://github.com/MichaelMassalas> and
@RosemaryONeill <https://github.com/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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEEaLxaZ_S-jFeRQ0eYrViVLPGlpB47Kks5rvljHgaJpZM4DIksH>
.
|
Thanks @RosemaryONeill. More testing to come.. |
Thank you!
…On Thu, Apr 13, 2017 at 1:41 PM, Matt Gifford ***@***.***> wrote:
Thanks @RosemaryONeill <https://github.com/RosemaryONeill>. More testing
to come..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEEaL5ohUOYbNuf6EFaA7zFD45-FTLRAks5rvl5GgaJpZM4DIksH>
.
|
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 |
The script I'm using that returns the error code 32 is below. To get it to
work, I had to remove the exclamation point and the apostrophe. Here's my
test twiitter account:
https://twitter.com/rosemaryoneill.
Could it be a setting in my Twitter account rather than the Twitter app? Or
is there perhaps something wrong with the way I installed monkehtweet?
Thanks for looking into this.
Rosemary
<cfscript>
// We also need to set the values into the authentication class inside
monkehTweets
application.objMonkehTweet.setFinalAccessDetails(
oauthToken = session['accessToken'],
oauthTokenSecret = session['accessSecret'],
userAccountName = session['screen_name']
);
// Let's make a test call. This will update the status of the authenticated
user.
// If you are using this for a number of users , you will need to set the
details prior to each call
// using the setFinalAccessDetails() method above.
// If you are using this purely for a single user, you can set all of the
// authentication details in the init() constructor method when
instantiating the application
returnData = application.objMonkehTweet.postUpdate("I'm using the awesome
##monkehTweets ColdFusion library from @coldfumonkeh!");
</cfscript>
<cfdump var="#returnData#" label="Returned data from the twitter request" />
…On Thu, Apr 13, 2017 at 1:54 PM, Matt Gifford ***@***.***> wrote:
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEEaL10EVh7CyE12Q8y8D6zQ9t2nEaipks5rvmFUgaJpZM4DIksH>
.
|
Which CFML engine and version are you using? |
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 |
I'm using Adobe CF 11.
…On Thu, Apr 13, 2017 at 2:16 PM, Matt Gifford ***@***.***> wrote:
Which CFML engine and version are you using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEEaLyiBlG9XMQOO0vgn2tCuNZ5VGBsrks5rvmZygaJpZM4DIksH>
.
|
I looked at the cfhttp tag that monkeyTweets constructs for status updates
with and without an exclamation point, and you can see that the status
message is definitely encoded and there's no difference between them. (I've
redacted codes, removed the < and added hard returns for readability.)
*FAILED TO AUTHENTICATE*
cfhttp url="https://api.twitter.com/1.1/statuses/update.json?
checkheader=false&
oauth_consumer_key=c...xxxxxx...G&
oauth_nonce=7...xxxxxx...B&
oauth_signature=t...xxxxxx...D&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1492091164&
oauth_token=2...xxxxxx...j&
oauth_version=1.0&
status=special%20characters%21&
timeout=30&
trim_user=false"
method="POST"
result="returnStruct"
multipart="true"
timeout="30"
cfhttpparam type="formfield" name="Authorization"
value=""Authorization: OAuth
realm="",oauth_version="1.0",oauth_nonce="7...xxxxxx...B",oauth_token="2...xxxxxx...j",oauth_consumer_key="c...xxxxxx...G",oauth_timestamp="1492091164",oauth_signature_method="HMAC-SHA1",oauth_signature="t...xxxxxx...D""
cfhttp
*AUTHENTICATED*
cfhttp url="https://api.twitter.com/1.1/statuses/update.json?
checkheader=false&
oauth_consumer_key=c...xxxxxx...G&
oauth_nonce=0...xxxxxx...C&
oauth_signature=7...xxxxxx...D&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1492090609&
oauth_token=2...xxxxxx...j&
oauth_version=1.0&
status=Testing%20twitter%20code&
timeout=30&
trim_user=false"
method="POST"
result="returnStruct"
multipart="true"
timeout="30"
cfhttpparam type="formfield" name="Authorization"
value=""Authorization: OAuth
realm="",oauth_version="1.0",oauth_nonce="0...xxxxxx...C",oauth_token="2...xxxxxx...j",oauth_consumer_key="c...xxxxxx...G",oauth_timestamp="1492090609",oauth_signature_method="HMAC-SHA1",oauth_signature="7...xxxxxx...D""
cfhttp
…On Thu, Apr 13, 2017 at 2:20 PM, Matt Gifford ***@***.***> wrote:
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEEaL17GJrD4YKFCoaEWOjrCbNDvlukkks5rvmdzgaJpZM4DIksH>
.
|
Posting "test message" works, but posting "test message!" results in:
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?
The text was updated successfully, but these errors were encountered: