Meteor accounts-twitter unable to get working

寵の児 提交于 2019-12-01 11:00:29

Here are the steps you need to do to make Twitter auth work with Meteor on Cloud9:

  • Make sure your application is Public, not private. You can do that by clicking on 'Share', and checking Public next to 'Application' within your Cloud9 workspace
  • Make sure you set the twitter callback as https://<workspace-name>-<username>.c9users.io
  • Since Meteor twitter auth package defaults to using 0.0.0.0:8080 (the IP:PORT you start it with) as the callback host, so you need to add the ROOT_URL environment variable. If you're using a Cloud9 runner, you can add environment variables by clicking on the 'ENV' button on the run panel and adding it. Set ROOT_URL to your application's external URL. Otherwise you can just do it within the terminal by typing in: $ export ROOT_URL='https://<workspace-name>-<username>.c9users.io/'

Note: Please note that by default Meteor starts at port 3000, but you need to set the port to 8080 in order to make it work.

I don't think the address 0.0.0.0:8080 is correct. Meteor runs on port 3000 by default and his address is localhost, so the callback URL should be http://127.0.0.1:3000/_oauth/twitter?close

Read more about using Twitter login with Meteor in this tutorial: http://meteor.hromnik.com/blog/login-with-facebook-twitter-and-google-in-meteor

EDIT: For production usage use your production URL:

http://abc.matthewcanty.c9.io/_oauth/twitter?close

Here are steps for creating Twitter account integration on Cloud9: http://www.servicepro.wiki/wiki/1171/cloud9-twitter-account-integration-for-sign-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!