我必须在这里向所有朋友发送应用程序请求我正在使用此代码向一个朋友发送请求它工作正常但我想向多个/所有朋友发送请求
private void sendRequestDialog() {
Bundle params = new Bundle();
params.putString("to", "1782990807");
params.putString("message",
"Learn how to make your Android apps social");
WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(
Logout.this, Session.getActiveSession(), params))
.setOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(Bundle values,
FacebookException error) {
if (error != null) {
if (error instanceof FacebookOperationCanceledException) {
Toast.makeText(
Logout.this.getApplicationContext(),
"Request cancelled", Toast.LENGTH_SHORT)
.show();
} else {
Toast.makeText(
Logout.this.getApplicationContext(),
"Network Error", Toast.LENGTH_SHORT)
.show();
}
} else {
final String requestId = values
.getString("request");
if (requestId != null) {
Toast.makeText(
Logout.this.getApplicationContext(),
"Request sent", Toast.LENGTH_SHORT)
.show();
} else {
Toast.makeText(
Logout.this.getApplicationContext(),
"Request cancelled", Toast.LENGTH_SHORT)
.show();
}
}
}
}).build();
requestsDialog.show();
}
在这里,我正在传递一位朋友的 facebook id 我如何发送给所有/多个朋友我有我急需的所有朋友的 facebook id 谢谢提前 :)