我正在努力插入FB Share的链接。 该链接正在调用JS。 JS打开一个弹出窗口,我的图像丢失了。
我有两个选择: sharer.php 2. API?
1:这不是我的照片!!!
function fbs_click(id, photo) {
var adv_url = encodeURIComponent("https://www.bikesquare.com.au/product/detail?advertiseId=" + "e77180f8439fe2810143be28c40e000e");
var photo_url = encodeURIComponent("https://www.bikesquare.com.au/resources/IMG_0554.JPG"); //THIS IS A REAL IMAGE - ONLY FOR TEST!!!
var new_url="https://www.facebook.com/sharer.php?s=100";
new_url += "&p[url]=" + adv_url;
new_url +="&p[images][0]=" + photo_url;
new_url +="&p[summary]=TEST";
new_url +="&p[title]=TITLE";
window.open(new_url, 'Share on FaceBook', 'left=20,top=20,width=550,height=400,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=1');
return false; //FOR TEST ONLY
}
2:这是我的照片,但我只能分享!其他FB帐户不能
var url = 'https://www.facebook.com/dialog/feed?app_id=[MY SECRET API ID]&link=' +
encodeURIComponent('https://www.bikesquare.com.au/product/detail? advertiseId=') + id +
'&picture=' + encodeURIComponent(photo_url) +
'&name=' + encodeURIComponent('BikeSquare Advertise') +
'&redirect_uri=' + encodeURIComponent('https://www.bikesquare.com.au/');
window.open(url, 'Share on FaceBook', 'left=20,top=20,width=550,height=400,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=1');
正如你可以看到女士们,先生们,我有两种选择。选项1未显示照片。选项2需要来自FB DEV的APP ID,但我只能分享它(照片看起来不错)。其他帐户不能......
我在这里缺少什么?
答案 0 :(得分:0)
开始使用FB API方法并发现DEV MODE上没有公共模式......