0

The documentation for the Open Graph beta says:

Group by - Option is only available if your Aggregation is displaying Objects. This option allows the aggregation to group by a property of the object. For example, you can group by Movie object's type, to show how many times you've watched a certain type of movie.

How do you select this?

I have Egg objects with that have a Collection property and want to aggregate based on that.

For example, one aggregate story would include Egg objects with Collection set to "Easter" and another would include Egg objects with Collection set to "Christmas".

Group By always seems to default select the object type I choose for Data to Display and I don't see an option to manually set this. Nor do I see a way to set the Aggregation Title to be the name of the group.

rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
Brad Dwyer
  • 6,305
  • 8
  • 48
  • 68

1 Answers1

1

You can't group by a String, only an Object. Try making an Object Type called Collection and make urls for each collection. Then Collection will show up in Data to Display and you can group by it.

Paul Tarjan
  • 48,968
  • 59
  • 172
  • 213
  • Thanks, I think my problem was that I was misunderstanding the meaning of `Data to Display` -- I thought since what I wanted was a group of `Egg`s I should be putting that there; but it sounds like what I am defining there is the type of the aggregation. – Brad Dwyer Sep 28 '11 at 20:16
  • Don't you want `Collections` to be displayed? Many eggs might fall into the same bucket, so showing an `Egg` is ambiguous. How can I change the developer tool to make it easier to understand? – Paul Tarjan Sep 28 '11 at 20:51
  • What I ideally want to display are the eggs. I'd like the aggregation to **be** the `Collection`. A `Collection` would be an aggregation of eggs (showing the images of the `Eggs` rather than the `Collection`s and the aggregation would be named `{egg.collection.title}`) I don't think that's what this is doing although I'm still messing with it. What's happening now is there's a box called "Collections" that shows several `Collection`s which reference all `Egg`s having that `Collection` referenced. What I think I want is one less layer; one box for each type of `Collection` displaying its eggs – Brad Dwyer Oct 02 '11 at 14:54
  • A better analogy would be like in the Photos app. An egg would be analogous to a photo and an aggregation would be analogous to an album (grouping photos that are alike). The name of the album is generally what the photos have in common and in your Timeline you see an album with its photos rather than a group of albums with their cover-photos. – Brad Dwyer Oct 02 '11 at 14:56
  • What if on your side when I build my `Collection` you let me pick which egg to use as the "cover photo" and then use that one as the og:image for it? – Paul Tarjan Oct 02 '11 at 18:05
  • I mean that would work but the whole goal is to be able to display the eggs they find on their profile -- I could have it be the most recent one as well but that still only leaves one out of each `Collection` shown. Is there no way to do a Photos-esque multiple image gallery? I see support for an array of images but regardless of what I do only the first one ends up showing up. – Brad Dwyer Oct 02 '11 at 21:51