CoastalResilienceNetwork / GeositeFramework

Mapping Framework powering TNC Coastal Resilience programs
http://maps.coastalresilience.org/network/
GNU General Public License v3.0
13 stars 10 forks source link

Permalink shortner no longer shortening #407

Closed mmcfarland closed 9 years ago

mmcfarland commented 9 years ago

The Google URL shortened permalink is no longer displaying, the full hash based URL is displaying instead.

mmcfarland commented 9 years ago

Logged error from production:

message:Error in URL Shortener
triedTo[code]:403
triedTo[data][0][domain]:usageLimits
triedTo[data][0][reason]:dailyLimitExceededUnreg
triedTo[data][0][message]:Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.
triedTo[data][0][extendedHelp]:https://code.google.com/apis/console
triedTo[message]:Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.
url:http://maps.coastalresilience.org/gsvg/
mmcfarland commented 9 years ago

I originally built this feature to allow an apiKey to be provided, we may only need to instruct them to sign up for a key and insert:

https://github.com/CoastalResilienceNetwork/GeositeFramework/blame/84decd3e0073b72330b3c0974723a5c3268d3ee9/src/GeositeFramework/js/App.js#L28

mmcfarland commented 9 years ago

To generate and include an API Key to allow the Google URL shortner to continue to work, follow these instructions:

  1. Visit https://console.developers.google.com
  2. To to the "APIs & auth > apis" section
  3. Under "Other Popular APIs" go to the "URL Shortner" link
  4. Click the Blue Button "Enable API"

Now you have to generate your API key:

  1. Under "APIs & auth > Credentials" section
  2. Public API access
  3. Key for Browser applications. If one exists, copy the API key value, otherwise "Create New Key"
  4. Select the option for Browser Key and leave the next text box blank. Hit Create and then copy the API key

In region.json, you have to enter is like this:

"googleUrlShortenerApiKey": "[your API Key]",

Remember to restart the website or recycle the app pool after modifying the region.json file