-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 post Tweet using Parse server, works fine on Parse.com #2062
Comments
Hmm... I am not seeing this particular issue, but are you having any other issues with the REST API? We are noticing that when we are writing and reading data from our mLab server for some period of time, we see high latency and errors (even though the RPS is around 4 from the external processes using REST API). Also, did you have to make any changes (other than API URI endpoint change) in your server code? |
For this particular use case, I did not have to even change the API URI endpoint in the server code. I am using three different REST calls with the same code that generates the authentication header: All three work fine on Parse.com hosted code. |
@mmahmood How about with read/writes of classes? Are you noticing any issues there with performance? We are having high latency when we are doing many reads/writes (even when equivalent parse.com RPS ~ 4 requests/sec) through REST API. Not sure what we are doing wrong/if there are some issues with REST API, in general, through parse-server. Yes, the problems we are facing... all work fine on the parse.com hosted code, as well. |
In my case, requests are being triggered manually and are probably 10/hour since I'm the only one testing at the moment. So basically what you're saying is that you can't help me in this? :( |
Did you add keys to the environment variables through the UI? |
Figured out the issue. In Parse.com, by default, Cloud Code httpRequests POST data with Content-Type application/x-www-url-formencoded. I explicitly added this content type to my header, and things are working now. |
Issue Description
I am posting Tweets via the REST API, and I am getting error "Could not authenticate you". The problem is that my code has been working fine, and still works fine on Parse.com. Now I am testing on Parse server on my localhost and also on the one on AWS. Both give me the same error. I have checked all the keys and secrets.
Here's what I'm doing: https://github.com/sreejithbnaick/Twitter-OAuth-1.1-Signature-Generator-js
This is working perfectly fine on Parse.com.
Code
var oauth1Header = self.twitterOAuth1Header(urlLink, post, config, userAccessToken.get('twitterAccessTokenSecret'),
userAccessToken.get('twitterAccessToken'), consumerSecret, httpMethod);
exports.twitterOAuth1Header = function(urlLink, post, config, tokenSecret, oauth_token, consumerSecret, httpMethod){
// Source: https://github.com/sreejithbnaick/Twitter-OAuth-1.1-Signature-Generator-js
}
Expected Results
Successful Tweet.
Actual Outcome
Error from Twitter
{ "code": 32, message": "Could not authenticate you."}
Environment Setup
The text was updated successfully, but these errors were encountered: