0

申し訳ありませんが、私はグラフを開くのに非常に慣れていないため、思い通りにアクションを投稿するのに苦労しています...

2 つのカスタム オブジェクト (本と著者) と、「本」に接続するアクション (読み取り) があるとします。また、「book」オブジェクトに「author」タイプのカスタム プロパティを追加しました。

Q1) 「読み取り」アクション投稿に「作成者」オブジェクトへのリンクを含めるにはどうすればよいですか? それは可能ですか?これまでのところ、「作成者」タイプのカスタム プロパティをどこで使用できるかはわかりません。

Q2) カスタム プロパティ名が「myapp:author」の場合、meta タグのコンテンツには正確に何を入力すればよいですか?? のように<meta property="myapp:author" content="??????">

誰かが光を当てることができれば、私はそれを大いに感謝します. カスタムプロパティを正確に使用する方法を説明しているfbドキュメントまたはstackoverflowの投稿が見つからないようで、これを2日間理解しようとしています...


このドキュメンテーションページでは、私ができることを説明していますが、正確にはどのように行うのですか???

「同じ料理アプリの例を使用して、作成者をレシピ オブジェクトに追加したい場合は、作成者の名前を文字列として提供するオブジェクトにプロパティ「作成者」を追加するだけで済みます。これをモデル化する別の方法は次のようになります。 「著者」プロパティが、著者の名、姓、プロフィール写真などのメタデータを持つ「プロフィール」オブジェクトを指すようにします。」

では、私の 2 つの質問に戻ります

Q1) 「料理」「レシピ」アクションの投稿がある場合、投稿で「作成者」への参照を含めることができます (例: ユーザーが myapp で作成者によるレシピを調理した場合)。

Q2) "author"プロパティのmetaタグの内容は?

4

1 に答える 1

1

You can see Bultin Object Book to understand how to define custom properties

<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>

For Custom types, like referring / using an an object in another object, See this complex object type

<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>

For more information You should read the open graph protocal.

于 2012-06-09T08:44:35.497 に答える