Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package hattrick.ass; import oauth.signpost.OAuth; import oauth.signpost.OAuthProvider; import oauth.signpost.basic.DefaultOAuthProvider; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; import oauth.signpost.exception.OAuthCommunicationException; import oauth.signpost.exception.OAuthExpectationFailedException; import oauth.signpost.exception.OAuthMessageSignerException; import oauth.signpost.exception.OAuthNotAuthorizedException; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.Toast; public class oauthtest extends Activity { private CommonsHttpOAuthConsumer httpOauthConsumer; private OAuthProvider httpOauthprovider; public final static String consumerKey = "**"; public final static String consumerSecret = "**"; private static String ACCESS_KEY = null; private static String ACCESS_SECRET = null; private final String CALLBACKURL = "myapp://mainactivity"; private static CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer( consumerKey, consumerSecret); private static OAuthProvider provider = new DefaultOAuthProvider( "http://chpp.hattrick.org/oauth/request_token.ashx", "http://chpp.hattrick.org/oauth/access_token.ashx", "http://chpp.hattrick.org/oauth/authorize.aspx"); private Button btnLogin; /* * * OnCreate method for class */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnLogin = (Button) findViewById(R.id.btnLogin); btnLogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { String authURL = provider.retrieveRequestToken( consumer, CALLBACKURL); Log.d("myapp", authURL); startActivity(new Intent(Intent.ACTION_VIEW, Uri .parse(authURL))); } catch (OAuthMessageSignerException e) { e.printStackTrace(); } catch (OAuthNotAuthorizedException e) { e.printStackTrace(); } catch (OAuthExpectationFailedException e) { e.printStackTrace(); } catch (OAuthCommunicationException e) { e.printStackTrace(); } } }); Uri uri = this.getIntent().getData(); if (uri != null && uri.toString().startsWith(CALLBACKURL)) { Log.d("myapp", uri.toString()); String verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER); Log.d("myapp", verifier); try { provider.retrieveAccessToken(consumer, verifier); ACCESS_KEY = consumer.getToken(); ACCESS_SECRET = consumer.getTokenSecret(); Log.d("myapp", ACCESS_KEY); Log.d("myapp", ACCESS_SECRET); } catch (OAuthMessageSignerException e) { e.printStackTrace(); } catch (OAuthNotAuthorizedException e) { e.printStackTrace(); } catch (OAuthExpectationFailedException e) { e.printStackTrace(); } catch (OAuthCommunicationException e) { e.printStackTrace(); } } } }