我没有得到任何错误,我给予正确的密钥和秘密。我连接到Facebook但状态不是在Facebook更新。 这是我的代码
OnCreate方法
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button share = (Button) findViewById(R.id.sharebutton);
share.setText("Share");
share.setTextColor(Color.WHITE);
share.setBackgroundResource(R.drawable.button_gradient);
adapter = new SocialAuthAdapter(new ResponseListener());
adapter.addProvider(Provider.FACEBOOK, R.drawable.facebook);
adapter.enable(share);
}
ResponseListener Class
private final class ResponseListener implements DialogListener
{
@Override
public void onComplete(Bundle values)
{
final String providerName = values.getString(SocialAuthAdapter.PROVIDER);
update = (Button) findViewById(R.id.update);
edit = (EditText) findViewById(R.id.editTxt);
update.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
adapter.updateStatus(edit.getText().toString(), new MessageListener(), false);
}
});
}