How can we display a different string in a custom action caption using text templates or formatters if a Profile
property is null?
Facebook displays a default caption for an action if a string property is not set or is empty.
For example, a caption for an action with a Profile
object, Cooked with {SomeProfile}
, displays the profile's description or something else if SomeProfile
is not defined.
Another example
I have an Cook
action type. Cook
is connected to a Profile
object type. Cook
has another Profile
action property SomeoneICookedWith
. I s开发者_运维技巧et the caption for Cook
to I cooked this with {SomeoneICookedWith}
.
If SomeoneICookedWith
is not empty and set to URL to John's profile, the caption on the timeline displays I cooked this with John
.
If SomeoneICookedWith
is empty, the caption on the timeline displays John is on Facebook. Join Facebook to connect with John and others you may know. Facebook gives people the power to share and makes the world more open and connected.
.
It displays the og:description
of the object if the action is aggregated or if the News Feed attachment isn't configured.
If you are trying to link directly to a Facebook profile, you can't control the og:description
. I would recommend making proxy pages with your own metatags that just redirect users but then you control the tags instead of us.
I've found that the og:description tag doesn't seem to be working with the og beta. The linter grabs my the description and my other custom object properties just fine, but when actually posting them, the only thing that shows up is the image, link, and the title. Description and everything else are left off, and the default 'Description' shows up. I'm beating my head against a wall since the Linter says it's working fine but it's not in actuality.
Paul's answer sounds ideal, but if you redirect the page, then Facebook follows the redirect and grabs the tags from the redirected page. Has anyone else run into this, and what's a good solution?
精彩评论