问题
I have one custom action (add) and two custom objects (favorites list) and (tv show). I want to add TV shows to Favorites List and register it with the Facebook Timeline. I.E. these two objects are attached to the same action.
I would like the news feed to read:
"[Joe] added [Modern Family] to his [Favorites List]."
I can't seem to figure out how to attach two objects to the same action and have them display in the timeline together. I can either do one or the other.
Anyone have any experience in this? Is this possible?
回答1:
Should favorites list really be an Open Graph object?
Can a user have several favorites lists with different names?
If each user only has one favorites list (called "Favorites list") there is no reason to have it defined as an Open Graph object.
Perhaps a descriptive App name could be used to make the aggregations readable.
[User] added [TV show] to [AppName]:
- Joe added Modern Family to MyFavoritesList.
- Joe added Modern Family and 3 other TV shows to MyFavoritesList.
- Joe, Bob and 3 others added Modern Family to MyFavoritesList.
回答2:
I have also been searching for a way of doing this, and I've not been able to find anything useful.
I noticed that Spotify does this without issue (straight from the feed of a friend): [user] listened to [song] by [artist] on Spotify, though looking at the 'types' documentation on open graph: http://ogp.me/#types looks like it is a custom feature for listening to music.
回答3:
Change your action from [add] to [Favorite] and have [Favorite] inherit from [like] rather than [action]
Add [Favorites List] as a custom property on [Favorite]
The title will still come up with only the object and action so:
"[Joe] favorited [Modern Family] with YourApp"
However then in the Configure Story Attachment you can add a few extra bits to the attachment in a caption e.g.:
[Modern Family] added to their [Favorites List].
Though obviously with curly braces :-)
回答4:
You can set [Favorite List] to be a property instead of a Connected Object Type and use braces on "Configure Sentences" to display it the way you want it
来源:https://stackoverflow.com/questions/9560915/facebook-open-graph-multiple-objects-per-action