我使用以下代码邀请 facebook 朋友到我的应用程序,
private void sendRequestDialog() {
Bundle params = new Bundle();
params.putString("message", "Receipt of Defeat");
Session session = Session.getActiveSession();
if (session == null) {
// try to restore from cache
session = Session.openActiveSessionFromCache(HomePage.this);
}
WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(
HomePage.this, session, params)).setOnCompleteListener(
new OnCompleteListener() {
@Override
public void onComplete(Bundle values,
FacebookException error) {
if (error != null) {
if (error instanceof FacebookOperationCanceledException) {
Toast.makeText(
getApplicationContext()
.getApplicationContext(),
"Request cancelled", Toast.LENGTH_SHORT)
.show();
} else {
Toast.makeText(
getApplicationContext()
.getApplicationContext(),
"Network Error", Toast.LENGTH_SHORT)
.show();
}
} else {
final String requestId = values
.getString("request");
if (requestId != null) {
Toast.makeText(
getApplicationContext()
.getApplicationContext(),
"Request sent", Toast.LENGTH_SHORT)
.show();
} else {
Toast.makeText(
getApplicationContext()
.getApplicationContext(),
"Request cancelled", Toast.LENGTH_SHORT)
.show();
}
}
}
}).build();
requestsDialog.show();
}
单击该通知后,它不会移动到 Playstore。我想把它移到 Playstore(我的应用程序)我已经在“安全画布 URL”中给出了链接