我的自定义打开图形对象的自定义属性不显示在共享对话框

我的自定义打开图形对象的自定义属性不显示在共享对话框

问题描述:

我不能让我的Andr​​oid应用程序的共享对话框中显示我的自定义的Open Graph对象的自定义属性。我在命名空间中的 myradio_android 创建一个自定义对象的渠道,然后在通道中定义的自定义属性的 current_song_title 。我还创建了一个自定义操作的欣赏,但我不能在共享对话框中显示的我的自定义属性current_song_title。我得到可以看到下面粘贴的图像。

I cannot get the custom properties of my custom Open Graph object displayed in the Share dialog of my Android app. I created a custom object channel in the namespace myradio_android, and defined a custom property current_song_title in channel. I also created a custom action enjoy, but I cannot get the my custom property current_song_title displayed in the Share dialog. What I get can be seen the pasted image below.

这里的code,我用创建共享对话框:

Here's the code I am using to create the Share dialog:

    // 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);

        }
    });

编辑:我已附上附件编辑对话框:

I have attached the Edit Attachments dialog:

而不是 myradio_android:通道:current_song_title 尝试 myradio_android:current_song_title