我按照sharing上的facebook教程链接。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
uiHelper = new UiLifecycleHelper(this, callback);
uiHelper.onCreate(savedInstanceState);
}
并在游戏中使用此界面进行分享按钮
@Override
public void fbShare() {
if (FacebookDialog.canPresentShareDialog(getApplicationContext(),
FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {
// Publish the post using the Share Dialog
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this)
.setLink("https://play.google.com/store/apps/details?id=com.viralsoft.RocketBoost")
.build();
uiHelper.trackPendingDialogCall(shareDialog.present());
} else {
// Fallback. For example, publish the post using the Feed Dialog
}
}
当我按下分享按钮facebook显示时,链接就在那里,我也可以写一些东西,但是当我推送分享时,它不会发布在我的墙上。我错过了什么代码?而且我也想分享游戏的高分。我刚刚开始在java编程中学习facebook sdk教程对我来说并不全面。谢谢!