问题描述
我想发邀请给用户的Facebook好友。对于我用下面的code:
I want to send invites to user's facebook friends. For that I use the following code:
String KEY_MESSAGE = "message";
Bundle params = new Bundle();
params.putString(KEY_MESSAGE, "Learn how to make your Android apps social");
WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(context, Session.getActiveSession(), params))
.setOnCompleteListener(new WebDialog.OnCompleteListener() {
@Override
public void onComplete(Bundle values, FacebookException error) {
if (error == null) {
Log.w(TAG, "Posted successfully. Values: " + values);
Toast.makeText(context, "Success", Toast.LENGTH_SHORT).show();
} else if (error instanceof FacebookOperationCanceledException) {
Log.e(TAG, "Post canceled");
} else {
Log.e(TAG, "Strange error: " + error);
Toast.makeText(context, "Error", Toast.LENGTH_SHORT).show();
}
}
})
.build();
requestsDialog.show();
我的应用程序显示请求对话框。我选择一个朋友,按下发送按钮。然后我发现通过这个朋友的ID。我的日志:
My app shows request dialog. I select one friend and push "Send" button. Then I find out this friend id via this website. My logs:
Posted successfully. Values: Bundle[{to[0]=<unknown-friend-id>, request=388113714696190}]
朋友,我想邀请bу不recive任何邀请。而他的ID不等于未知朋友-ID。它为什么是错误的?我没有想法
Friend that I want to bу invited do not recive any invites. And his id do not equals "unknown-friend-id". Why can it be wrong? I've got no ideas
P.S。不明-朋友-ID是一组数字。这是某人的ID。我决定不公布。不看丢的意见。他们是问题的priveous版本。
P.S. "unknow-friend-id" is set of numbers. It is someones id. I decided not to publish it. And don't look throw the comments. They are for priveous version of the question.
推荐答案
感谢@WizKid。正如他所说的:
Thanks @WizKid. As he said:
它不工作,因为你的应用程序还没有一个帆布的版本。欲了解更多信息,请阅读
It doesn't work because your app hasn't a canvas version. For more information you should read this
这篇关于Facebook的SDK - 而invating朋友错误ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!