login with twitter error in PFLoginViewController
Hi, I can't login with twitter with using ParseTwitterUtils. {"code":1,"message":"Internal server error."} (Code: 1, Version: 1.12.0)
typed in AppDelegate.m [PFTwitterUtils initializeWithConsumerKey:@"xxxxxxxxxxxxxxxxxxxxx" consumerSecret:@"xxxxxxxxxxxxxxxxxxxxx"];
then PFLogInViewController *logInController = [[DFParseLogInViewController alloc] init]; logInController.fields = PFLogInFieldsDefault | PFLogInFieldsFacebook | PFLogInFieldsTwitter; logInController.delegate= self;
i got the below message: "Login failed" {"code":1,"message":"Internal server error."} (Code: 1, Version: 1.12.0)
but it's ok when i use fabric & twitterkit sdk.
please help me.
Can you provide the server logs when running with VERBOSE=1?
a
Did you set your twitter configuration correctly?
oauth: { twitter: { consumer_key: « », consumer_secret: « » } }
uh sorry. where i set oauth?
where i configure this info? oauth: { twitter: { consumer_key: « », consumer_secret: « » } }
ahah! when you start your ParseServer. For now we don't rely on the keys and secret passed by the client to ensure your user has a valid login.
I declared in Appdelegate.m file [PFTwitterUtils initializeWithConsumerKey:@"EkubAxxxxxxGJApPD" consumerSecret:@"meqxxxxblCOwma"];
You need to configure it in parse-server https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#oauth
please explain...
Did you read the documentation relative to OAuth on parse-server that I just posted?
Thank you very much, just done.
@flovilmart I'm using parse server version 2.2.25 at both local and remote server. I have configured twitter login at index.js and using loginWith() to login. It works locally but not with remote server. I'm using AWS Elastic Beans for remote server. FYI, Facebook and Google login work remotely with the loginWith() function. Here's sample request for twitter ...
{
"authData":{
"twitter":{
"id":14303772,
"screen_name":"junal",
"consumer_key":"-----",
"consumer_secret":"---",
"auth_token":"14303772-----",
"auth_token_secret":"---"
}
},
"_ApplicationId":"---",
"_ClientVersion":"js1.9.2",
"_InstallationId":"c24a0cca-------"
}
Here's what I get. Any advice?
{
"code": 1,
"message": "Internal server error."
}
Probably an issue with your deployment to elastic beanstalk, if it works locally.
@flovilmart Upgrading my local parse-server to latest i.e 2.3.5 worked locally but when I update package.json file to update the same to remove server, it did but then it gave me 502 bad gateway error.
Again, likely an issue with how you deploy to Elastic Beanstalk. Not sure how you're configured nor how you deploy.
@flovilmart here's my configuration https://dl.dropboxusercontent.com/spa/e8jedo3lnl7g7wc/bckad01p.png and deploy using "eb deploy"
From the docs: If git is installed, EB CLI uses the git archive command to create a .zip file from the contents of the most recent git commit command.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-deploy.html
Are all your changes correctly commited?
Then perhaps the eb_*.logs that may give a pointer as for what went wrong in the deployment
when ever try to login with twitter in parse the below error occuring
TwitterLoginWithParseExample[2581:116523] Error: Error Domain=com.parse.networking.error Code=-1011 "Expected status code in (200-299), got 410" UserInfo={NSLocalizedDescription=Expected status code in (200-299), got 410, NSErrorFailingURLKey=https://api.parse.com/2/user_signup_or_login} (Code: 100, Version: 1.2.19)
Can you open the issue on the relevant repository? Seems that you're using an outdated SDK / example that has api.parse.com hardcodded (which is down at the moment)