简体   繁体   中英

Facebook sharer.php ignores image

have a trouble with sharing site material via facebook's sharer.php

Open window with standart code:

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');

where p[images][0] has correct image url.

Full URL example: CLICKCLAC

As you can see in Firebug there is right image in DOM tree, but it has "hidden_elem" class hang. Any ideas how to make it work, friends?

Or how to launch my js in iframe window :D

This might help: https://developers.facebook.com/docs/reference/dialogs/feed/

I got your link and image to show with this: https://www.facebook.com/dialog/feed?app_id=458358780877780&link=https://www.agenda.travel&picture=http://agenda.travel/i/welcome-slide-1.png&name=Wonderful%20Title&caption=Wonderful%20Caption&description=Wonderful%20description&redirect_uri=https://mighty-lowlands-6381.herokuapp.com/

You need an app id for this to work, and i hear sharer.php is deprecated and this is the way to go now.

App will give you two parameters for this: APP_ID and REDIRECT_URI will be validated against it.

如果在您的情况下可行,我建议在头部使用元标记(og:image)而不是共享者链接属性

我有同样的问题,Facebook没有显示小图像,我发送更大的图像,它的工作原理

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM