2015-04-17 53 views
0

我已經同步我的Facebook我的Twitter頁面所以每當我發表我的Facebook頁面上的鏈接它顯示的照片和姓名以及檢查如下圖: enter image description here如何顯示照片和URL縮短我的鳴叫

但我的鳴叫頁面上只會顯示一個沒有名字的鏈接,我必須點擊查看圖片,看下面的圖片照​​片檢查:

頁面上的meta標籤在那裏我分享鏈接

<meta name="twitter:card" content="photo" /> 
<meta name="twitter:site" content="@Eventc" /> 
<meta name="twitter:title" content="<?php echo ucwords($data['event_title']); ?>" /> 
<meta name="twitter:image" content="http://eventciti.com.ng/<?php echo $data['event_image']; ?>" /> 
<meta name="twitter:url" content="http://eventciti.com.ng/event/<?php echo $data['event_title']; ?>" /> 

那麼我如何顯示ph值oto在我的推文,也縮短了網址?

感謝

回答

0

要顯示在鳴叫的形象,你必須創建一個鳴叫與圖像手動添加來顯示它。可悲的元標籤不能達到你想要的。

如果你想使用API​​,我不知道一個PHP API。 您可以使用twitter4j以下行來自動顯示圖片或搜索php替代品或直接致電twitter。 https://dev.twitter.com/rest/reference/post/statuses/update

StatusUpdate update = new StatusUpdate("Message and http://Link"); 
update.setMedia(new File("pictureto show")); 
twitter.updateStatus(update); 

我覺得URL自動在視覺上截斷,如果它太長,並在郵件的末尾。