我无法获取我的Android应用程序的"共享"对话框中显示的自定义Open Graph对象的自定义属性.我在命名空间myradio_android中创建了一个自定义对象通道,并在通道中定义了一个自定义属性current_song_title.我还创建了一个自定义操作享受,但我无法在共享对话框中显示我的自定义属性current_song_title.我得到的可以看到下面粘贴的图像.
这是我用来创建"共享"对话框的代码:
// Facebook mImageButtonShareOnFacebook = (ImageButton)view.findViewById(R.id.shareOnFacebook); mImageButtonShareOnFacebook.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FacebookSdk.sdkInitialize(getActivity().getApplicationContext()); SharePhoto photo = new SharePhoto.Builder() .setBitmap(_albumCover) .setUserGenerated(true) .build(); // Create an object ShareOpenGraphObject object = new ShareOpenGraphObject.Builder() .putString("og:type", "myradio_android:channel") .putString("og:title", channel.getName()) .putString("og:description", "My description") .putString("myradio_android:channel:current_song_title", _title) .putPhoto("og:image", photo) .build(); // Create an action ShareOpenGraphAction action = new ShareOpenGraphAction.Builder() .setActionType("myradio_android:enjoy") .putObject("channel", object) .build(); // Create the content ShareOpenGraphContent content = new ShareOpenGraphContent.Builder() .setPreviewPropertyName("channel") .setAction(action) .build(); ShareDialog.show(NowPlayingFragment.this, content); } });
编辑:我已附加编辑附件对话框: