I have a following code which shares content to FB. How can I create custom og.type
and .setActionType
.
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "Tor")
.putString("og:title", tour.getTitle())
.putString("og:description", tour.getDescription())
.build();
// Create an action
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("tour.post")
.putObject("Tour", object)
.build();
// Create the content
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("Tour")
.setAction(action)
.build();
ShareDialog.show(TourActivity.this, content);
Example: If I add it with "og.type"
value to "books.book"
and .setActionType
value to books.read
then it shows in FB shared content that "Is reading book".(I do not want to display anything else except content I added. It should only display TourName and Description and heading Tour:).
It seems like that feature has been deprecated in 2017:
https://developers.facebook.com/docs/sharing/opengraph/custom-open-graph-deprecation