@@ -0,0 +1,2557 @@
+package org.scribe.examples;%0A%0Aimport org.scribe.builder.ServiceBuilder;%0Aimport org.scribe.builder.api.GoogleApi20;%0Aimport org.scribe.model.OAuthConstants;%0Aimport org.scribe.model.OAuthRequest;%0Aimport org.scribe.model.Response;%0Aimport org.scribe.model.Token;%0Aimport org.scribe.model.Verb;%0Aimport org.scribe.model.Verifier;%0Aimport org.scribe.oauth.OAuthService;%0A%0Aimport java.util.Scanner;%0A%0Apublic class GoogleExample20%0A%7B%0A    private static final String NETWORK_NAME = %22Google 2.0%22;%0A%0A    private static final String PROTECTED_RESOURCE_URL = %22https://docs.google.com/feeds/default/private/full/%22;%0A%0A    private static final String SCOPE = %22https://docs.google.com/feeds/%22;%0A%0A    public static void main( String%5B%5D args )%0A    %7B%0A        // Replace these with your own api key, secret and callback%0A        String apiKey = %22apiKey%22;%0A        String apiSecret = %22apiSecret%22;%0A        String callback = %22http://www.example.com/google/back%22;%0A%0A        OAuthService service =%0A            new ServiceBuilder().provider( GoogleApi20.class ).apiKey( apiKey ).apiSecret( apiSecret ).callback(%0A                callback ).scope( SCOPE ).grantType( OAuthConstants.AUTHORIZATION_CODE ).build();%0A%0A        System.out.println( %22=== %22 + NETWORK_NAME + %22's OAuth Workflow ===%22 );%0A        System.out.println();%0A%0A        // Obtain the authorization url%0A        String url = service.getAuthorizationUrl( null );%0A%0A        System.out.println( %22go there : %22 + url );%0A        System.out.println( %22paste the authorization code %3E%3E%22 );%0A        Scanner in = new Scanner( System.in );%0A        Verifier verifier = new Verifier( in.nextLine() );%0A%0A        Token accessToken = service.getAccessToken( null, verifier );%0A%0A        System.out.println( %22Got the access Token!%22 );%0A        System.out.println( %22(if your curious it looks like this: %22 + accessToken + %22 )%22 );%0A        System.out.println();%0A%0A        // Now let's go and ask for a protected resource!%0A        System.out.println( %22Now we're going to access a protected resource...%22 );%0A        OAuthRequest request = new OAuthRequest( Verb.GET, PROTECTED_RESOURCE_URL );%0A        service.signRequest( accessToken, request );%0A        request.addHeader( %22GData-Version%22, %223.0%22 );%0A        Response response = request.send();%0A        System.out.println( %22Got it! Lets see what we found...%22 );%0A        System.out.println();%0A        System.out.println( response.getCode() );%0A        System.out.println( response.getBody() );%0A%0A        System.out.println();%0A        System.out.println( %22Thats it man! Go and build something awesome with Scribe! :)%22 );%0A%0A    %7D%0A%7D

add example for Google OAuth 2.0