其实我在这方面很新,所以这个问题对你们许多人来说似乎有点愚蠢。 无论如何这里是:
我在android上创建这个应用程序,它应该从edittext字段获取输入并将其发布到Facebook页面墙。
现在我有了这段代码,但是hows mfacebook.**dialog**(this, "stream.publish", params, this);
有一个错误说:
The method dialog(Context, String, Bundle, Facebook.DialogListener) in the type Facebook is not applicable for the arguments (new View.OnClickListener(){}, String, Bundle, new View.OnClickListener(){})
。
有人可以告诉我出了什么问题吗?
public class FetchData extends Activity {
private Facebook mfacebook;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fetch_data);
final Button widget45 = (Button)findViewById(R.id.widget45);
final Button widget44 = (Button)findViewById(R.id.widget44);
final Button imageButton2 = (Button)findViewById(R.id.imageButton2);
final Button imageButton1 = (Button)findViewById(R.id.imageButton1);
final ImageButton widget48 = (ImageButton)findViewById(R.id.widget48);
final ImageButton widget49 = (ImageButton)findViewById(R.id.widget49);
final ImageButton widget51 = (ImageButton)findViewById(R.id.widget51);
final ImageButton widget56 = (ImageButton)findViewById(R.id.widget56);
final EditText widget40 = (EditText)findViewById(R.id.widget40);
.
.
.
.
.
.
.
.
imageButton1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//To change body of implemented methods use File | Settings | File Templates.
mfacebook = new Facebook("558718227474980");
Bundle params = new Bundle();
params.putString("message", widget40.getText().toString());
mfacebook.dialog(this, "stream.publish", params, this);
}
});
}
}