2009-11-05 44 views
0

如何在Facebook附件(流)中包含鏈接?
它顯示< a>標記爲純文本。在Facebook附件中包含鏈接(流)

此外,什麼是屬性的用途?

屬性:提供關於帖子更多信息的鍵/值對數組。 properties數組只能包含純文本和鏈接。要包含一個鏈接,該屬性的值應該是一個包含'text'和'href'屬性的字典。

回答

1

如果您的附件具有密鑰,它將被格式化爲超鏈接。例如:

{'media': 
    [{'type': 'image', 
    'src': 'http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-kitten-finished-his-milk-and-wants-a-cookie.jpg', 
    'href': 'http://icanhascheezburger.com/2009/03/30/funny-pictures-awlll-gone-cookie-now/'}, 
    {'type': 'image', 
    'src': 'http://photos.icanhascheezburger.com/completestore/2009/1/18/128768048603560273.jpg', 
    'href': 'http://ihasahotdog.com/upcoming/?pid=20869'}]} 

這將加載兩個圖像,每個圖像都包含在超鏈接中。