have the code ready for Javascript. You must of course enter your API key.
The only other point they don’t mention is the parameters for the search call. The ‘q’ parameter is the standard search text. Then the ‘cx’ parameter is required, and that’s the ID of your Google Custom Search Engine. So this line:
return gapi.client.search.cse.list({})
must look more like this:
return gapi.client.search.cse.list({
“cx”: “XXXXXXX”,
“q”: “My Search Text”
})
With that, it works very well. 🙂
No Comments yet!
Warning: Undefined array key "comment_author_url_web" in /home/galleryr/www/www/wp-content/themes/civihosting/functions.php on line 555