Tuesday, 31 January 2012
Take Google Maps Indoors
More info: maps.google.com Lost indoors? Take Google Maps on your Android phone to select airports, malls, and retail stores to get floor layouts and accurate location readings. Figure out how to get to departments, airport gates, and even restrooms all from the palm of your hand.
Friday, 27 January 2012
Google Reducing the Local Search Result
I first noticed this yesterday where every search for “storage + city” returned a 3-pack result regardless of the city that was searched (ie storage Toronto, storage Detroit, storage Miami etc etc etc ). This was true even on international searches like storage Paris, Fr.This change apparently occurred about two weeks ago and despite doing a range of searches both logged in and not, the ”storage + city” never returned a Blended Result nor a Pack other than the 3-Pack.
While this search result was strange enough, today at least, many search results that were returning 7 Blended results or the 7-Pack are now returning many fewer pinned results.
So my questions for you:
1)Are any of you in the storage business and how long have you been seeing this 3-pack only result?
2)For all of you, are your local searches now returning fewer pinned results in the main SERPS?
Wednesday, 25 January 2012
Free imagery for Western Australia
There is new free imagery for Western Australia that will be of great use for mining and exploration industry: Satellite ASTER Geoscience Map of Western Australia.
Quoting from media release, “ASTER, Japanese imaging instrument flying on the US TERRA satellite, launched in December 1999, has 14 spectral bands spanning wavelengths sensitive to important rock forming minerals, including: iron oxides, clays, carbonates, quartz and “Hydrothermal” minerals such as muscovite and chlorite.”
“ASTER geoscience maps provide new mineral information not available from other current technologies. This new mineral information is valuable for more accurate mapping of the regolith cover that blankets much of Australia and finding those often small islands of bedrock materials, such as greenstones that may be associated with gold.”
The project was a collaboration between the Department of Mines and Petroleum’s (DMP) Geological Survey of Western Australia (GSWA) and the Centre for Three Dimensional Mineral Mapping Centre of Excellence (C3DMM) and was led by the Commonwealth Scientific and Industrial Research Organisation’s (CSIRO).
The State ASTER maps have been carved into 1:1,000,000 mapsheets with individual file sizes reduced to ~100 MB each and can be downloaded for free in JPG2000 GeoTIFF format from CSIRO. The complete data set (~500 Gigabytes), is available from Geological Survey Western Australia product sales.
Branded Local Search Results: Google Vs. Bing
With the rollout of Google Search Plus Your World, there has been a great deal of discussion about whether Google’s actions are a basis for antitrust.
The issues revolve more around user trust than antitrust. The full impact of the change has yet to be felt in Local BUT a number of other recent efforts by Google to cross promote their own properties have started to impact local results.
Here is a branded local search for Barbara Oliver Buffalo. Google has made sure that Barbara Oliver’s local brand and website are readily accessible from search. She certainly seems to be benefiting from Google’s brand focus.
However, her site, like many SMB sites, uses an embedded Google MyMap on the directions page and and offers an embedded YouTube video. She also has a very lightly used Plus Page. That hardly seems to warrant the high ranking that each of those pages have received. There are seven links to Google properties above the fold that lead to Maps, Places, YouTube, Plus and MyMaps. Clearly Google is also cross promoting their other properties but one certainly has to question whether the searcher is best served by these results.
I have captured a Bing search result for comparison purposes so that you can decide which engine returns the most relevant results for the branded search. Let me know which one you think offers more relevant results.
(click to see larger)
To see the Bing screen shot of the branded search for Barbara Oliver Buffalo….
AdWords, DFA and DFP Client Library Updates
We’re constantly making improvements to our AdWords, DoubleClick for Advertisers (DFA) and DoubleClick for Publishers (DFP) client libraries across all supported languages. Recently, we added the following features. Read the ChangeLogs and READMEs for details on these changes:
Ruby
- GZIP compression used when sending and receiving API calls and reports. (Perl and Java do not have this for AdWords API Report Downloads).
- SSL certificate verification.
- AdWords only - Examples and support for the new CreateAccountService.
- No other updates.
- A preview version of the rewritten Java client library is now available for AdWords, DFA and DFP APIs. Please consider this alpha-quality code; please file any bugs or feature requests on the issue tracker. The new library currently supports Maven2, SLF4J, OAuth and we have plans to support other environments and platforms.
- Improved parameters validation and error reporting on missing / mistyped fields.
- HTTP headers are now logged on DEBUG level.
- Fixes to OAuth logic to better handle misconfigurations.
- Several bug fixes.
- AdWords only - Added example to get the clientCustomerId for a clientEmail.
- AdWords only - Fixed issue with GetAccountHeirarchy example when used in the sandbox.
- Fixed issue with lingering "id" attribute after reference replacement. Added tests for SoapXmlFixer.
- Validation and error handling has been improved to make it easier to use OAuth and Google AppEngine.
Sunday, 22 January 2012
New DEM and land cover data
Last week Geoscience Australia released a couple of new free data products for Australia: Digital Elevation Models (DEM) at 1 second (30m resolution) derived from the NASA Shuttle Radar Topography Mission (previously restricted only for research purposes) and Dynamic Land Cover, the first nationally consistent and thematically comprehensive land cover reference with 250m resolution.
The following are excerpts from respective media releases and posts on the Geoscience Australia web site:
“The new 30m DEM products improve our understanding of the national topography by producing digital elevation models at more than eighty times the resolution of the current national 9 second (250m) DEM”.
“The models were produced as part of a collaboration between Geoscience Australia, the Bureau of Meteorology (Bureau), the CSIRO and the Australian National University who have produced a number of derived products for applications such as surface water management and floodplain mapping.”
“Geoscience Australia and the Bureau are already working on phase 3 of a national scale dataset that will integrate the new DEM with regional scale (best available) topographic data. The end result will be a more accurate determination of water course activity across the country enabling communities to better prepare for water related natural hazard .”
DEM data can be downloaded for free from the National Elevation Data Framework Portal administered by Geoscience Australia (limit of 400MB per download apply).
“Land cover is the observed biophysical cover on the Earth’s surface including trees, shrubs, grasses, soils, exposed rocks and water bodies, as well as anthropogenic elements such as plantations, crops and built environments.”
“Produced in partnership with the Australian Bureau of Agricultural and Resource Economics and Sciences (ABARES), the land cover map and dataset will allow users to compare vegetation over time, at a national and local level, to monitor trends associated with short term changes brought on by cyclones, long term drought and bushfires, as well as cropping and broadacre agriculture.”
“Future updated versions of the map will identify actual changes in the land cover which could provide evidence of a need for action in areas such as water management and soil erosion, or that patterns of land use are changing due to economic, climatic or other factors.”
Grasslands are the dominand feature of Australia’s landscape, covering more than one third of the land area (37.1% or 2.8 million square kilometers).
Export to HTML5 with new Swiffy extension
Swiffy enables you to convert Flash SWF files to HTML5. One of our main aims for Swiffy is to let you continue to use Flash as a development environment, even when you’re developing animations for environments that don’t support Flash.
To speed up the development process, we’ve built the Swiffy Extension for Flash Professional. The extension enables you to convert your animation to HTML5 with one click (or keyboard shortcut). The extension is available for both Mac and Windows, and it uses Swiffy as a web service, so you’ll always get our latest and greatest conversion. Information about the conversion process is shown within Flash Professional.
You can download the Swiffy Extension from the Google Swiffy site. We hope it will streamline your workflow when you use Flash and Swiffy to produce HTML5 animations.
Tuesday, 17 January 2012
Volcano in the Red Sea
Earlier this month, a volcano erupted in the Red Sea with fisherman reporting the lava fountains reaching heights of up to 30 meters! The imagery of the eruption, captured by NASA's EO-1 ("Earth Observing-1) satellite, shows an amazing plume of ash and water vapor.
This volcano erupted in an area of previously unbroken water, and apparently caused the formation of a new island, seen here:
You can read more about this on NASA's Earth Observatory site or see it in Google Earth by using this KML file.
AdMob and AdWhirl
The AdWhirl SDK provides a framework that allows developers to display banner ads from different ad networks in their iOS and Android applications. You simply tell AdWhirl what ad networks you want to use and the percentage of requests to allocate to each network, and AdWhirl handles the ad requests. But how do you choose an acceptable refresh rate, and what settings should you use for both AdWhirl and your individual ad networks?
AdWhirl has its own refresh rate; when it comes time to refresh, AdWhirl removes the current network’s ad view, chooses a new ad network, and creates a new ad view for that network. So how is this different from the AdMob refresh rate? Well, the AdMob refresh rate determines when its own ad view will request a new ad.
AdWhirl does not know about the specific ad networks’ refresh rates. Most networks expose the refresh rate on the client side; AdWhirl takes advantage of this by turning off refreshing for these networks. AdMob, however, only supports configuring the refresh rate on the server side. Therefore, AdWhirl must rely on you, the developer, to turn off the network refresh rate. Forgetting to do so may result in unexpected refreshes. This is best demonstrated with an example.
Let’s say AdWhirl has selected the AdMob network for displaying an ad, and your AdMob refresh rate is 29 seconds while your AdWhirl refresh rate is 30 seconds. AdWhirl will load up an AdMob view, and then the AdMob view will request and show an ad. After 29 seconds, AdMob decides it's time to refresh, grabs a new ad on it's own, and displays a new ad. AdWhirl has no idea that AdMob just refreshed. One second later, AdWhirl decides it’s time to refresh (30 seconds have passed), and removes the AdMob view and picks a new ad network from which to show an ad.
In the above example, AdMob displayed a new ad that was shown for only one second--it had virtually no chance of being clicked. This results in extra impressions that reduce your click through rate and confuse your customers. To avoid having AdMob refresh on its own, make sure to turn off automatic refreshing for the AdMob publisher ID you are mediating with!
Please post to the forum for any questions regarding refresh rates.
Monday, 16 January 2012
The year with clean energy investment
Google made a new $94 million investment in a portfolio of four solar photovoltaic (PV) projects being built by Recurrent Energy near Sacramento, California. This brings their portfolio of clean energy investments to more than $915 million. They already committed to providing funding this year to help more than 10,000 homeowners install solar PV panels on their rooftops. But this investment represents our first investment in the U.S. in larger scale solar PV power plants that generate energy for the grid—instead of on individual rooftops. These projects have a total capacity of 88 MW, equivalent to the electricity consumed by more than 13,000 homes.
They are investing alongside global investment firm KKR and Recurrent Energy, a leading solar developer. Google will provide a $94 million equity investment and SunTap Energy, a new venture formed today by KKR to invest in solar projects in the U.S., will provide the remaining equity.
They are joining KKR on their first renewable energy investment in the U.S. We believe investing in the renewable energy sector makes business sense and hope clean energy projects continue to attract new sources of capital to help the world move towards a more sustainable energy future.
Solar panels at one of the Recurrent projects
The energy produced by these projects is already contracted for 20 years with the Sacramento Municipal Utility District (SMUD). SMUD recently created a feed-in tariff program (FIT) to help green the grid for Sacramento-area residents. We’re excited that these projects are the first to be built under the program.
Since January, we’ve invested more than $880 million in clean energy projects. We believe the world needs a wide range of solutions—from wind, to transmission, to solar PV and concentrated solar—and we look forward to new opportunities next year to further expand our portfolio of clean energy investments.
XmlPullParser.nextText()
Using XmlPullParser is an efficient and maintainable way to parse XML on Android. Historically Android has had two implementations of this interface:
- KXmlParser, via XmlPullParserFactory.newPullParser().
- ExpatPullParser, via Xml.newPullParser().
Xml.newPullParser()
had a bug where calls to nextText()
didn’t always advance to the END_TAG
as the documentation promised it would. As a consequence, some apps may be working around the bug with extra calls to next()
or nextTag()
:
public void parseXml(Reader reader)
throws XmlPullParserException, IOException {
XmlPullParser parser = Xml.newPullParser();
parser.setInput(reader);
parser.nextTag();
parser.require(XmlPullParser.START_TAG, null, "menu");
while (parser.nextTag() == XmlPullParser.START_TAG) {
parser.require(XmlPullParser.START_TAG, null, "item");
String itemText = parser.nextText();
parser.nextTag(); // this call shouldn’t be necessary!
parser.require(XmlPullParser.END_TAG, null, "item");
System.out.println("menu option: " + itemText);
}
parser.require(XmlPullParser.END_TAG, null, "menu");
}
public static void main(String[] args) throws Exception {
new Menu().parseXml(new StringReader(""
+ "
"
+ " Waffles"
+ " Coffee"
+ "
"));
}
In Ice Cream Sandwich we changed Xml.newPullParser()
to return a KxmlParser and deleted our ExpatPullParser class. This fixes the nextTag()
bug. Unfortunately, apps that currently work around the bug may crash under Ice Cream Sandwich:
org.xmlpull.v1.XmlPullParserException: expected: END_TAG {null}item (position:START_TAG @1:37 in java.io.StringReader@40442fa8)
at org.kxml2.io.KXmlParser.require(KXmlParser.java:2046)
at com.publicobject.waffles.Menu.parseXml(Menu.java:25)
at com.publicobject.waffles.Menu.main(Menu.java:32)
The fix is to call nextTag()
after a call to nextText()
only if the current position is not an END_TAG
:
while (parser.nextTag() == XmlPullParser.START_TAG) {
parser.require(XmlPullParser.START_TAG, null, "item");
String itemText = parser.nextText();
if (parser.getEventType() != XmlPullParser.END_TAG) {
parser.nextTag();
}
parser.require(XmlPullParser.END_TAG, null, "item");
System.out.println("menu option: " + itemText);
}
The code above will parse XML correctly on all releases. If your application uses nextText()
extensively, use this helper method in place of calls to nextText()
:
private String safeNextText(XmlPullParser parser)
throws XmlPullParserException, IOException {
String result = parser.nextText();
if (parser.getEventType() != XmlPullParser.END_TAG) {
parser.nextTag();
}
return result;
}
Moving to a single XmlPullParser simplifies maintenance and allows us to spend more energy on improving system performance.
Your own online Google scrapbook
Google unveiled this year’s Zeitgeist, including the fastest rising searches in 2011. Those of us on the Google Green team were pleased that the search trends include several popular searches related to the environment (as you can see from the highlights video). So we created the Green Scrapbook to help you explore these green trends, choose your favorites, and reveal videos and surprising facts about them. As you click around, you create your very own collection of what green meant to you this year, which you can personalize with your name and share with your friends.
People have already started creating and sharing their Green Scrapbook. For example, Adam created one showcasing a video of a tapir (Belize’s endangered “mountain cow”) and highlighting what an LED light is. I created my scrapbook, too, where I could tell people about the microorganisms that light up Puerto Rico’s famous “bioluminescent bay.” I also let people know that if I could win an eco-friendly car, I’d choose a Tesla (there’s still time to get me one for Christmas!).
Once you complete your own scrapbook, you can share it on Google+ or anywhere you’d like by grabbing the unique URL to your scrapbook with the “get URL” link at the top right.
We’re working hard to create a better web that’s also better for the environment. We hope the Green Scrapbook sparks conversation and gets people thinking about all the ways they can make greener choices in their lives.
YouTube Direct
YouTube Direct, our open source platform for obtaining and moderating user-generated videos (and photos!), was first announced over two years ago. Since that time, the project has continued to grow, and we’re happy to announce the latest round of additional features.
Most notably, we’ve released a completely rewritten YouTube Direct upload client for iOS devices (seen below). You can find it in its own open source project, and it complements the existing upload client for Android devices. As with the Android client, we see the iOS code as a reference implementation and a starting point for developers who want to build their own branded applications that submit video or photos that could be moderated using YouTube Direct.
The biggest change in the 3.0 release of the YouTube Direct server code has to do with multitenancy. As explained in this guide, YouTube Direct administrators can now deploy their code to App Engine once, and have App Engine serve many different logical instances of YouTube Direct, each with their own submission queues and moderators. While not every YouTube Direct deployment will benefit from this new functionality, we see it being particularly useful for agencies and other organizations that might have multiple individual clients, each interested in keeping track of their own YouTube Direct submissions.
YouTube Direct powers a wide variety of video submission initiatives: sites as diverse as the New York Times’ Reflections on 9/11 project, DrugFree.org’s “You are not alone” and Google Developers’ own “Share your story” page are running by YouTube Direct behind the scenes.
Wednesday, 11 January 2012
Exploring volkano in Google Earth
At over 2,000 sq. mi., Mauna Loa is the largest volcano in the world. In fact, if you measure it from its base deep in the ocean, it's the highest mountain on the planet!
Google Sightseeing has recently created a great tour of the volcano, showing off some of its most amazing features like the lava flow (KML) seen below.
In addition to the amazing satellite imagery and 3D terrain in Google Earth, there is also Street View imagery in various places around the volcano. This KML file will take you to one of the highest Street View points in the area. If you're not familiar with how to use Street View in Google Earth, this post will help you get started.
The volcano had its last major eruption in 1984, putting us in the middle (or the end?) of the longest quiet period that has ever been recorded for Mauna Loa.
To learn more, check out the full post on Google Sightseeing and then grab their KML file to view all of the sights mentioned in the post.
Tuesday, 10 January 2012
The Real ideas with SketchUp
Every week, two million people use SketchUp to breathe life into their ideas. The resulting 3D models get made into houses and schools, movie sets and aquariums, bridges, robots, and furniture. The sum total of all this work represents a larger, yet untold story of how the SketchUp community is profoundly shaping the world around us.
Well, it’s time for all you unsung SketchUp heroes to stand up and take a bow, so today, we’re kicking off the Make Ideas Real project. The result of this initiative will be an innovative, online showcase that does justice to the impact SketchUp users are having on the physical world.Here’s how you can pitch in: Use this form to tell us your SketchUp story. Send us an image of a SketchUp model with an accompanying photograph that shows your completed project. Anything goes for subject matter; architecture, archeology, industrial design, construction, woodworking, personal fabrication, model railroading, mousetrap design — as long as SketchUp helped you make it, we want to see it. Professionals, semi-professionals and proud amateurs are all welcome.
Here are three examples of what we mean:
City Lights Residence, Steve Oles
SKPR Bot, John Bacus
Stand Up Desk, Dave Richards and George LaRue Downing
Over the next few months, we’ll curate the submissions we receive, and in 2012, we’ll launch a special showcase of SketchUp users who are reimagining the spaces we inhabit. Please share your story with us, so we can share it with the world.
Monday, 9 January 2012
The information about real-world places
I love eating out with my friends and trying new places, but one of the most difficult questions you can ask me is "Where do you want to eat?" Today, we’re making a few improvements to Google search that will make it a lot easier and faster to answer this question. For example, I mentioned to a friend that I’ll be visiting Boston, and he suggested that I check out a barbecue place called Redbones BBQ in Davis Square. Since I don't know that restaurant, I do a quick search for [redbones bbq] to see if it’s a place I’d like.
When I do, I see the same familiar search results page but I notice that there's now a new panel to the right of the results -- where previously only a map appeared -- with much more information than before. I see two images with pegman, the Street View mascot, below the map so I click on the first one. This instantly takes me to an immersive 360-degree interior view of the restaurant, as if I were virtually teleported to Redbones.
I pan around and see that it's a cool colorful restaurant with a nice, comfy feel. What's more, when I go back to the search results panel and click on the second image, I’m able to look around the outside of the restaurant and get a sense for the neighborhood via the familiar Street View experience. I’m beginning to really like this place! Further down the panel, I see the price range indicating it won’t be too expensive and an “at a glance” summary that tells me Redbones has great beer and pulled pork sandwiches -- and menu links if I want to see more. Thanks to this helpful information right on the search results page, I’ve quickly been able to make my decision: I’m going to Redbones for a pulled pork sandwich.
Even if I’m not looking for a particular place by name, I can learn about places and quickly decide which ones are right for me. If I want to find a bar near Redbones for a few drinks after dinner, I can just search for [bars davis square] and get a familiar list of results. Only now, scanning the list and comparing places is easier than ever, since the instant preview feature will show the same detailed information about the various bars when I hover over the “>>” symbol to the right of each result. After just a few seconds perusing the additional local information for different places, I know that Joshua Tree has a great beer selection and that the Orleans has live music but is a bit farther away.
This new type of layout may appear on the search results page for a range of real-world places -- restaurants, hotels, local businesses, landmarks, museums and more. Of course, the local information that appears will vary depending on what’s available online. So the next time you plan your visit to the New England Aquarium or Fenway Park, you might be able to check out their opening hours, get directions, and find the nearest transit stops, all from a simple Google search.
In the coming weeks, you’ll start seeing the improved local search experience in more than 40 languages. Give it a try and start discovering new local favorites, near and far!(Cross-posted on the Inside Search blog.)
Sunday, 8 January 2012
OAuth 2.0 for web applications
Following the launch of our new AdSense Management API we want to shed some light on the OAuth 2.0 authentication protocol for web applications, presenting examples for the languages that we are supporting at the moment of writing: Java, Python and PHP.
Background
We strongly recommend reading Using OAuth 2.0 to Access Google APIs to learn about the Google implementations of OAuth 2.0 before proceeding with this post.
Java
The Google APIs Client Library for Java features a powerful and easy to use OAuth 2.0 library.
Using the library is even easier with the GoogleOAuth2ThreeLeggedFlow helper class.
First create an instance of GoogleOAuth2ThreeLeggedFlow, passing the following parameters to the constructor:
- a key that will be used to associate this flow object with an end user
- the Client ID for your application
- the Client Secret for your application
- the scope you are requesting access to (AdSense in your case)
- the callback URL where the user should be redirected to in order to complete the flow
GoogleOAuth2ThreeLeggedFlow authFlow = new GoogleOAuth2ThreeLeggedFlow( userId, "INSERT_CLIENT_ID_HERE", "INSERT_CLIENT_SECRET_HERE", "https://www.googleapis.com/auth/adsense", "http://example.com/path/to/auth_return");To start the flow, get the authorization URL and redirect the user there:
String authUrl = authFlow.getAuthorizationUrl(); response.sendRedirect(authUrl);If the user grants your application permission to access their data, they will be redirected to your callback URL and you’ll need to parse the authorization code from the request:
String authorizationCode = request.getParameter("code");The last step is to use the authorization code to obtain an access token. First you’ll need to initialize a transport for communication with the Authorization server and a factory for handling JSON, as the access token will be returned as a JSON object:
JsonFactory factory = new JacksonFactory(); HttpTransport transport = new NetHttpTransport(); authFlow.setHttpTransport(transport); authFlow.setJsonFactory(factory);Now you can finalize the authentication flow by obtaining credentials for your user, using those credentials to create the Adsense helper object and then sending your signed requests to the API:
Credential credential = authFlow.complete(authorizationCode); Adsense adsense = new Adsense(transport, credential, factory); AdClients adClients = adsense.adclients.list().execute();Python The home of the Google APIs Client Library for Python is also the home of OAuth2Client, a library designed for connecting to resources protected by OAuth 2.0. First create an OAuth2WebServerFlow object, passing the following parameters to the constructor:
- the Client ID for your application
- the Client Secret for your application
- the scope you are requesting access to (AdSense in your case)
- an HTTP User-Agent to identify this application
flow = OAuth2WebServerFlow( client_id='INSERT_CLIENT_ID_HERE', client_secret='INSERT_CLIENT_SECRET_HERE', scope='https://www.googleapis.com/auth/adsense', user_agent='your-beautiful-python-app/1.0')Now to start the flow you need to redirect the user to the Authorization URL, providing a callback URL where Google will send the authorization code. You will also need to serialize your flow object somewhere, as we will need to access it again after the redirection to the callback URL:
# in a multiuser environment, associate it to a specific user # local to your application store_flow(pickle.dumps(flow)) callback = 'http://example.com/path/to/auth_return' authorize_url = flow.step1_get_authorize_url(callback) request_handler.redirect(callback)Back from the redirect, retrieve your OAuth2WebServerFlow object and proceed to step2, where the authorization code will be parsed from the request and used to request an access token:
flow = pickle.loads(retrieve_flow) credentials = flow.step2_exchange(self.request.params)Now you can create an an Http object and use the credentials to authorize it:
http = httplib2.Http() http = credentials.authorize(http)Now that your Http object is authorized, instantiate a service wrapper for the AdSense Management API and start querying the API:
service = build("adsense", "v1", http=http) result = service.adclients().list().execute()PHP The Google APIs Client Library for PHP enables PHP developers to work with Google APIs such as the AdSense Management API. The apiOAuth2 class implements the OAuth 2.0 web-server authentication flow for the PHP language. To handle the OAuth2 web-server authentication flow in PHP you need to require the source for the apiClient and the source for the service class of the API that you are targeting, create and configure the apiClient for the authentication and then create the Adsense service:
require_once '../../src/apiClient.php'; require_once '../../src/contrib/apiAdsenseService.php'; $client = new apiClient(); // Visit https://code.google.com/apis/console to // generate your oauth2_client_id, oauth2_client_secret, and to // register your oauth2_redirect_uri. $client->setClientId('YOUR CLIENT ID HERE'); $client->setClientSecret('YOUR CLIENT SECRET HERE'); $client->setDeveloperKey('YOUR_DEVELOPER_KEY_HERE'); // The oauth2_redirect_uri is typically the path // to where you host this PHP file. $this->client->setRedirectUri(‘YOUR_REDIRECT_URI_HERE’); $adSense = new apiAdsenseService($client);Call ‘authenticate’ on the client to start the authentication flow. If the user is not yet authenticated, the application will receive an authorization code as GET parameter, and this will then be used by the client to request an access token, returned by authenticate. All in this simple call:
$client->setAccessToken($client->authenticate());And there is more. What happens when the access token expires? Nothing that you can perceive. The API client will use the refresh token to request a new access token for you, and you won’t even notice. Once we are authorized, querying the AdSense Management API is simple as:
$result = $adSense->adclients->listAllAdclients();That’s all folks! For now... In this post we have seen examples of how to authenticate your web applications using the Google implementation of the OAuth 2.0 protocol and the libraries that we are providing to simplify all of the tasks involved. But it’s not all, stay tuned to our blog: in the upcoming posts we will see how to authenticate with OAuth 2.0 using native applications and how to avoid repeated authorization requests for your users, in multi user environments.
Saturday, 7 January 2012
3D tours of Mount Urgull in San Sebastian
Last year, we showed you some incredible 3D models in Spain built by Peterg Pedro Domecq, otherwise known as 'Gipuzkoa3d'. He's back again with some more excellent models, this time with a great tool to show them off.
Urgull is a hill in the heart of San Sebastian, Spain, and was a defense point in the 12th century, with walls and military structures installed in the 16th centry. It also saw some action in various wars in 1813, 1823, 1836 and 1876. The city council now owns it.
When you visit Urgull3D, you'll find quite a few ways to explore the area. There are options down the right side to fly you to various aspects of it; clicking the name will fly you there, and checking the box will display the clickable icon on the map for more info.
Even better, you can use the links at the very top of the page to view historical maps (standard historical imagery), adjust the time of day (sunlight), and get a few smooth tours of the area. Go check it out, as it's a great way to explore the area!
Wednesday, 4 January 2012
Think Insights with Google
Quick pop quiz:
- Based on search history, consumer demand for pretzels peaks in what month of the year?
- How much (in $) does search add to the world’s GDP?
- In 2011, what percent of people dreamed and brainstormed about their next vacation?
- What percent of the daily queries on Google.com have never been seen before?
OAuth 2.0 Playground
In March, Google announced that all of the Google Web APIs adopted support for OAuth 2.0. It is the recommended authorization mechanism when using Google Web APIs.
Today, we are announcing the OAuth 2.0 Playground, which simplifies experimentation with the OAuth 2.0 protocol and APIs that use the protocol. Trying out some requests in the OAuth 2.0 playground can help you understand how the protocol functions and make life easier when the time comes to use OAuth in your own code.
Selecting the APIs to authorize
With the OAuth 2.0 Playground, you can walk through each step of the OAuth 2.0 flow for server-side web applications: authorizing API scopes (screen shot above), exchanging authorization tokens (screen shot below), refreshing access tokens, and sending authorized requests to API endpoints. At each step, the Playground displays the full HTTP requests and responses.
Exchanging the authorization code for a refresh token and an access token
The OAuth Playground can also use custom OAuth endpoints in order to test non-Google APIs that support OAuth 2.0 draft 10.
OAuth configuration screen
You can click the link button to generate a link to a specific Playground state. This allows quick access to replay specific requests at a later time.
Generating a deep link to the playground’s current state
Please feel free to try the OAuth 2.0 Playground. We are happy to receive any feedback, bugs, or questions in the OAuth Playground forum.
Cross-posted on the Google Apps Developer Blog
Monday, 2 January 2012
Map data updates for the United Kingdom, Germany, Finland, and Sweden
One of the biggest challenges of mapping the world is that the world is continually changing. At Google we aim to provide fresh, detailed, and accurate maps that evolve at the same pace as the world around us. As a consequence we’re happy to roll out updated maps for the United Kingdom, Germany, Finland, and Sweden, accompanied by the launch of the "Report a Problem" tool for these countries.
The map updates we are rolling out today include a number of improvements, such as more accurate water bodies, and more comprehensive parks coverage. The “Report a Problem” tool allows Google Maps users, and Maps API developers, to notify Google of errors in our map data, with email notification when their error reports have been resolved. For more information, see our announcement on the Google LatLong blog.
As with previous map data updates, it’s important that any data you have cached for these countries that was obtained using a Maps API service such as the Geocoding API be refreshed following this update. Periodical refreshing of cached data will also ensure that you benefit from any updates and corrections that are applied in future. If you have any questions or concerns, please consult the relevant Maps API forum.
The Europe’s eTowns
It’s often assumed that big cities benefit the most from the Internet, but we believe the net offers giant opportunities to everyone from urbanites to small town residents, farmers and nature lovers in the far-flung countryside. We recently tested this thesis in our first-ever European Google eTown awards, which recognize those areas that had most embraced the web’s potential over the last year.
The results were fascinating—and surprising. Smaller, quirky and plucky towns came out ahead. Scunthorpe, a steel town in the north of England, topped the U.K.’s list. Caen, a town in rural Normandy not far from the D-Day beaches and famed as the home of camembert cheese, came first in France. Salerno, nestled between the Amalfi and the Cilento Coast led the way in Italy and ElblÄ…g, a remote northern town located in the region of 1,000 lakes won in Poland. In all four participating countries, eTown lists included towns of all sizes.
How did we determine our eTown awards? We broke down the U.K., France, Italy and Poland into all of their thousands of towns and then ranked local areas according to the growth in small businesses using AdWords over the last year. The top towns in each country won Google eTown awards.
The results back up recent research identifying the Internet as a main force driving growth throughout Europe. For example, a recent McKinsey report Internet Matters states that 2.6 Internet jobs are created globally for every job destroyed. Separately, the Boston Consulting Group estimates that by 2015 the web will account for 7.3 percent of Denmark’s GDP, 10 percent of the U.K.’s GDP and 5.5 percent of France’s GDP. The net drives growth of both big and small businesses—indeed another BCG report called “Turning Local” (PDF) makes clear that small businesses with a website grow faster than businesses without a web presence.
We’ve seen this ourselves, in the businesses of all shapes and sizes that we encountered as part of our eTown awards. An entrepreneur in Hartlepool in the U.K. sells golf balls online. A Polish programmer runs a data recovery business from Piaseczno. An plumber directs a heating systems company from Vicenza, Italy and a French retailer has reached new scooter customers online in Reims. Online advertising has helped them grow and reach more customers than ever before. When it comes to the Internet, our eTown awards show that anybody, almost anywhere, can boost a business by going online.
Subscribe to:
Posts (Atom)