很抱歉,我对打开图形很陌生,一直很难按我想要的方式发布一个动作。
如果我有两个自定义对象(book和author)和一个与"book“连接的操作(read)。我还在"book“对象中添加了"author”类型的自定义属性。
Q1)如何获得“读取”动作帖子以包含指向“作者”对象的链接?这可能吗?到目前为止,我还不知道在哪里可以使用"author“类型的自定义属性。
( Q2)如果自定义的属性名是"myapp:author",那么在元标记中,我应该在内容中放什么??如在<meta property="myapp:author" content="??????">
如果有人能给我一点启发,我会非常感激的。我似乎找不到任何fb文档或堆栈溢出帖子描述如何准确地使用自定义属性,我一直试图找出这两天.
这个文件页描述了我能做什么,但是我到底该怎么做呢?
“使用相同的烹饪应用程序示例,如果我们想将作者添加到菜谱对象中,我们只需向对象添加一个属性”author“,我们就可以将作者的名字作为字符串提供给该对象。另一种建模方法是让”author“属性指向一个”profile“对象,该对象在作者的名字、姓氏、配置文件图片上有元数据。
所以回到我的两个问题
( Q1)如果我有一个“厨师”“食谱”动作帖子,我可以在帖子中提到“作者”(例如,用户在我的应用程序上做了一个菜谱)
Q2)“作者”属性的元标记内容应该是什么?
发布于 2012-06-09 08:44:35
您可以看到Bultin目标书来理解如何定义自定义属性。
<html>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#
book: http://ogp.me/ns/book#">
<meta property="fb:app_id" content="YOUR_APP_ID">
<meta property="og:type" content="book">
<meta property="og:url" content="URL of this object">
<meta property="og:image" content="URL to an image">
<meta property="og:description" content="Description of content">
<meta property="og:title" content="Name of book">
<meta property="book:release_date" content="DateTime">
<meta property="book:author" content="Who wrote this">
<meta property="book:isbn" content="ISBN Number">
<meta property="book:tag" content="keywords">
</head>
<body>
<!--a wonderful book -->
</body>
</html>有关自定义类型,如引用/使用另一个对象中的对象,请参见此复杂对象类型
<html>
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#
your-og-app: http://ogp.me/ns/apps/your-og-app#">
<meta property="fb:app_id" content="YOUR_APP_ID">
<meta property="og:type" content="your-og-app:restaurant">
<meta property="og:title" content="Sample Restaurant">
<meta property="og:description" content="A great sample restaurant">
<meta property="og:image" content="https://your-great-image">
<meta property="your-og-app:owner:street_address"
content="1601 S. California St.">
<meta property="your-og-app:owner:locality" content="Palo Alto">
<meta property="your-og-app:owner:region" content="California">
<meta property="your-og-app:owner:postal_code" content="94304">
<meta property="your-og-app:owner:country_name" content="United States">
<meta property="your-og-app:owner:email" content="nospam@fb.com">
<meta property="your-og-app:owner:phone_number" content="111-111-1111">
<meta property="your-og-app:owner:fax_number" content="111-111-1111">
<meta property="your-og-app:owner:website"
content="http://www.facebook.com">
</head>
<body>
<!--a wonderful web page of Sample Restaurant -->
</body>
</html>有关更多信息,请阅读开放图协议。
https://stackoverflow.com/questions/10959404
复制相似问题