7

I'm successfully using FBSDKShareOpenGraphObject, FBSDKShareOpenGraphAction, FBSDKShareOpenGraphContent and [FBSDKShareAPI shareWithContent:...] on iOS to create and share a story. The shares item always posts as "Josh Paradroid travelled a metre in app". What I would like is to be able to post "Josh Paradroid travelled 500 metres in app". My plurals all seem to be correctly setup in the story but how do I choose to use the "One to Many" version and provide the number of metres from within the code?

Many thanks.

Burhanuddin Sunelwala
  • 5,318
  • 3
  • 25
  • 51
Josh Paradroid
  • 1,172
  • 18
  • 45

1 Answers1

1

The "one to many" type if for when you want to post about multiple objects, e.g. different kind of meters. If you want a distance to be in the OG text, it's just one of the parameter you can define.

Roemer
  • 3,566
  • 1
  • 16
  • 32
  • I think I understand what you mean but the examples when setting up the plurals gives an example that sounds like what I want: "Josh Paradroid travelled 500 metres." – Josh Paradroid Apr 23 '15 at 15:24
  • In that case, the "metre" is a single object. So for example, "Josh cooked 3 meals". But I think in this case the "500" is an attribute, not so much a quantity. So you could also say "Josh travelled a distance of 500 meters", or "Josh cooked a meal with 10 ingredients". See the difference? – Roemer Apr 23 '15 at 15:31
  • I'm kind of confused as to why Facebook's Open Graph system setup shows me examples of the exact phrases I want but I don't seem to be able to use them. I'm kind of confused about how I specify that 500 in the code. – Josh Paradroid Apr 23 '15 at 15:40
  • The phrase might be exact what you're looking for, but the semantics can be different :) take a look at these docs, they explain how to set up the property (for example, "distance"): https://developers.facebook.com/docs/sharing/opengraph/custom#objects. You can then define that property like such: https://developers.facebook.com/docs/sharing/opengraph/ios#sharedialog – Roemer Apr 23 '15 at 15:48
  • It's too long to paste here but here's my code [link](http://pastebin.com/krHzRUcu) – Josh Paradroid Apr 23 '15 at 15:54