-1

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:).

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Himanshu
  • 49
  • 9
  • @Kling Klang Why I am not getting answer from anybody? Any answer or suggestions? – Himanshu May 14 '18 at 18:41
  • 1
    ... give them time? Sometimes people will answer one or two days ago. But the best answer could come 5 years later. Not everyone who can answer your question lives in your timezone. Or maybe they do not even know about StackOverflow, yet. Be patient. Meanwhile, research, study, try, do. – Phantômaxx May 14 '18 at 18:48

1 Answers1

-1

It seems like that feature has been deprecated in 2017:

https://developers.facebook.com/docs/sharing/opengraph/custom-open-graph-deprecation

There are two options to replace Custom Open Graph stories:

  1. Use built-in Open Graph actions, including the new games.plays, which posts only to people's activity log, and books.rates.
  2. Or use standard link, quote, photo, video, or multi-media share.
opello
  • 3,254
  • 2
  • 23
  • 23
Mitze Meyer
  • 21
  • 1
  • 3