i am using facebook api for android using facebook developer guide. I was able to implement the login for facebook api for android. I want to implement logout function. I have tried following developers guide, but have no idea which place exactly i have to implement. I will be grateful if u guys cud help me out below is the code.
public class FacebookandroidsdkActivity extends Activity {
/** Called when the activity is first created. */
Facebook facebook = new Facebook("252039928190210");
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
facebook.authorize(this, new DialogListener() {
@Override
public void onComplete(Bundle values) {}
@Override
public void onFacebookError(FacebookError error) {}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
facebook.authorizeCallback(requestCode, resultCode, data);
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…