goo.gl

Using javascript to access Google's URL shortener APIs in a Google Chrome extension

穿精又带淫゛_ 提交于 2019-12-23 09:04:09
问题 I am writing my first google chrome extension which will use Google's URL shortener api to shorten the URL of the currently active tab in Chrome. I am a longtime sw developer (asm/C++) but totally new to this "webby" stuff. :) I can't seem to figure out how to make (and then process) the http POST request using js or jquery. I think I just don't understand the POST mechanism outside of the curl example. My javascript file currently looks like this: chrome.browserAction.onClicked.addListener

Goo.gl URL Shortener Stopped Working (php/curl)

混江龙づ霸主 提交于 2019-12-22 05:04:28
问题 For some reason my script stopped working today. When I look in the API control panel says I still have 100% left of usage. Any ideas? Did they change the auth way? function url_small($url) { //This is the URL you want to shorten $longUrl = $url; $apiKey = '#####HIDDEN######'; //Get API key from : http://code.google.com/apis/console/ $postData = array('longUrl' => $longUrl, 'key' => $apiKey); $jsonData = json_encode($postData); $curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_URL, 'https

Problems using the goo.gl API from google apps script

别等时光非礼了梦想. 提交于 2019-12-03 21:51:07
问题 I'm trying to query the goo.gl API from inside a Google Apps Script. The problem I'm seeing is the following error message: Request failed for https://www.googleapis.com/urlshortener/v1/url?key=AIXXXXXXXXXXXXXXXXXXXXXLmGJQw returned code 400. Server response: { "error": { "errors": [ { "domain": "global", "reason": "parseError", "message": "This API does not support parsing form-encoded input." } ], "code": 400, "message": "This API does not support parsing form-encoded input." } } (line 28)

Problems using the goo.gl API from google apps script

故事扮演 提交于 2019-11-30 23:53:29
I'm trying to query the goo.gl API from inside a Google Apps Script. The problem I'm seeing is the following error message: Request failed for https://www.googleapis.com/urlshortener/v1/url?key=AIXXXXXXXXXXXXXXXXXXXXXLmGJQw returned code 400. Server response: { "error": { "errors": [ { "domain": "global", "reason": "parseError", "message": "This API does not support parsing form-encoded input." } ], "code": 400, "message": "This API does not support parsing form-encoded input." } } (line 28) the message comes up when I try to do the actual request at UrlFetchApp.fetch(post_url, options); .