2011-10-07 76 views
0

如何與描述共享一些鏈接?我發現通過meta標籤傳遞標題& url的方式,但是對於簡短描述呢?Facebook和分享

回答

2

你的意思是Open Graph的meta標籤? description是一個元標記,就像titleurl

<meta property="og:description" 
      content="A group of U.S. Marines, under command of 
        a renegade general, take over Alcatraz and 
        threaten San Francisco Bay with biological 
        weapons."/> 

Open Graph Protocol documentation

0

您可以使用facebook ui

這裏是例子:

function share() { 
    url = "http://some.url.com"; 
    FB.ui({ 
     method: 'stream.publish', 
     message : '', 
     display: 'popup', 
     attachment: { 
      name: 'some title', 
      href: url, 
      description: 'Some description', 
      media: [{'type':'image', 'src': "http://some.site.com/link/to/thumbail.jpg", href: url }] 
     }, 
     user_message_prompt: '' 
     } 
    ); 
}