private void authpost(String verificationCode) throws
OAuthMessageSignerException, OAuthNotAuthorizedException,
OAuthExpectationFailedException, OAuthCommunicationException,
IOException{
        /*Creates a consumer object and configure it with access
         * token and token secret still needed from service I HAVE NO
IDEA
         * WHAT THEY ARE*/

        OAuthConsumer consumer = new CommonsHttpOAuthConsumer(
                CONSUMER_KEY, CONSUMER_SECRET,
SignatureMethod.HMAC_SHA1);
          Log.i("cliqdroid", "Finished consumer loading function");
          consumer.setTokenWithSecret(ACCESS_TOKEN, TOKEN_SECRET);


        //Http request to the protected resource
        URL url = new URL("https://api.cliqset.com/200905/user/radzell/
profile");
        HttpURLConnection request = (HttpURLConnection) url.openConnection
();

        //sign the request so it can get past the security
        consumer.sign(request);

        //send the request to the server in order to obtain access to
resource
        request.connect();

        String responsecode = request.getResponseMessage();

        Log.i("Cliqdroid", responsecode);

        // create a new service provider object and configure it with
        // the URLs which provide request tokens, access tokens, and
        // the URL to which users are sent in order to grant
permission
        // to your application to access protected resources

        OAuthProvider provider = new DefaultOAuthProvider(consumer,
                REQUEST_TOKEN_ENDPOINT_URL, ACCESS_TOKEN_ENDPOINT_URL,
                AUTHORIZE_WEBSITE_URL);

         // fetches a request token from the service provider and builds
        // a url based on AUTHORIZE_WEBSITE_URL and CALLBACK_URL to
        // which your app must now send the user
        @SuppressWarnings("unused")
                String url1 = provider.retrieveRequestToken(OAuth.OUT_OF_BAND);

        provider.retrieveAccessToken(verificationCode);


    }
The emulator keep saying the program unexpectically stopped
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to