问题
What should I enter for Home Page URL and Callback Domain if I want to develop a web application that uses the Yahoo API locally. I can't get a secret and publishable key without this.
I'm not sure if asking this question is appropriate here, but any advice, guidance, etc. would be really appreciated. I'm fairly new to the web application development world.
回答1:
I ran into issues with the Yahoo API using OAuth on my local development environment. I wanted to use http://localhost in the 'Home Page URL' and 'Callback Domain'. Yahoo wouldn't allow it.
Option 1
Since, Yahoo does not let you modify settings of the Apps you register with them, you need to create a new one. Try this:
- In the Yahoo Developer Network, go to My Apps and create a new app.
- Set the
Application Type
toInstalled Application
instead ofWeb Application
. - The
Home Page URL
andCallback Domain
will be optional. Set it or don't set it. I believe you can pass in the callback url
Option 2
For Home Page URL
and/or Callback Domain
, I had some success using a TLD that points back to localhost. For instance http://lvh.me and all of it's sub-domains just point back to your computer (127.0.0.1).
Option 3
Alternately, try using IP address 127.0.0.1 instead for Home Page URL
and/or Callback Domain
.
回答2:
- Don't verify the domain.
- Don't make the web version, but a desktop app.
来源:https://stackoverflow.com/questions/22795939/configuration-for-yahoo-api-for-localhost-development