我的应用程序有一个启动 Facebook 网络对话框的按钮。登录后,应用程序有一个对话框让用户写一些内容,当他点击“分享”按钮时,我们代表他发布一个链接。
执行 2 或 3 次“分享”动作,Facebook 在短时间内将类似的内容分组到用户供稿上,而不是显示正常内容,而是显示类似于附图中显示的内容。用户时间线正常。
我们正在使用以下实现来发布链接:
Bundle postParams = new Bundle();
postParams.putString("name", getString(R.string.app_name));
postParams.putString("caption", getResources().getString(R.string.home));
postParams.putString("description", someDescription);
postParams.putString("message", someMessage);
postParams.putString("picture", a link to a picture);
postParams.putString("link", a link to open the page to download the app);
final Request request = new Request(this.session,
"me/feed", postParams, HttpMethod.POST);
request.setCallback(new Request.Callback() {
@Override
public void onCompleted(final Response response) {
final FacebookRequestError error = response.getError();
if (error == null) {
// Do something
} else {
switch (error.getErrorCode()) {
case FEED_LIMIT:
// Do something
break;
case DUPLICATE_MESSAGE:
// Do something
break;
case MISSING_MESSAGE:
// Do something
break;
case CONNECTION:
// Do something
break;
default:
// Do something
break;
}
}});
request.executeAsync();
我们只是这样做,我们可以重现并看到它发生。
希望对理解有所帮助。