簡體   English   中英

Facebook sharer.php忽略圖像

[英]Facebook sharer.php ignores image

通過facebook的sharer.php共享網站資料有困難

使用標准代碼打開窗口:

url = "http://www.facebook.com/sharer.php?s=100&p[title]=" + encodeURIComponent(title) + "&p[summary]=" + encodeURIComponent(description) + "&p[url]=" + encodeURIComponent(url) + "&p[images][0]=" + encodeURIComponent(image) + "&nocache=" + randomString(8);
window.open(url, '', 'toolbar=0,status=0,width=626,height=436');

其中p [images] [0]具有正確的圖像URL。

完整的URL示例: CLICKCLAC

正如您在Firebug中看到的那樣,DOM樹中有正確的圖像,但它有“hidden_​​elem”類掛起。 朋友,有什么想法讓它成功嗎?

或者如何在iframe窗口中啟動我的js:D

這可能會有所幫助: https//developers.facebook.com/docs/reference/dialogs/feed/

我得到了你的鏈接和圖像: https//www.facebook.com/dialog/feed?app_id = 458358780877780& link = http//www.agenda.travel&picture=http : //agenda.travel/i/welcome -slide-1.png&名稱=奇妙%20Title&字幕=奇妙%20Caption&描述=奇妙%20description&REDIRECT_URI = HTTPS://mighty-lowlands-6381.herokuapp.com/

你需要一個應用程序ID才能工作,我聽說sharer.php已被棄用,這是現在的方法。

應用程序將為您提供兩個參數:APP_ID和REDIRECT_URI將針對它進行驗證。

如果在您的情況下可行,我建議在頭部使用元標記(og:image)而不是共享者鏈接屬性

我有同樣的問題,Facebook沒有顯示小圖像,我發送更大的圖像,它的工作原理

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM