facebook app loading slow in android
i took the example from
http://developers.facebook.com/docs/guides/mobile/ now whenever
i run the app...either it takes too long time to load the face book sign-up or it never loads...it stays in whit screen with heading
now what shall i do to load in a faster way...
开发者_JS百科`public class MyGreatActivity extends Activity {
Facebook facebook = new Facebook("20875929582353");
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
facebook.authorize(this, new DialogListener() {
@Override
public void onComplete(Bundle values) {
// TODO Auto-generated method stub
}
@Override
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
}
@Override
public void onError(DialogError e) {
// TODO Auto-generated method stub
}
@Override
public void onCancel() {
// TODO Auto-generated method stub
}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
facebook.authorizeCallback(requestCode, resultCode, data);
}
}`
I just tried your example code and it works for me. It first shows a loading dialog and then the page shows an error message. Maybe not what you want, but no freezes.
Are you sure you have an internet connection at the moment in your emulator? I know from experience that sometimes the emulator just looses the internet connection and you have to restart it.
精彩评论