Chrome移动设备上FB.ui供稿对话框上的空白页面

时间:2014-11-19 17:23:16

标签: javascript facebook facebook-graph-api user-interface

我无法让Feed对话框以正确的方式运行,并且无法在google上找到任何好的解决方案。

这是我的代码:

FB.ui({
	method: 'feed',
	name: 'The title',
	link: 'http://link.com',
	picture: 'http://link.com/image.jpg',
	caption: 'The caption',
	description: 'The description',
	redirect_uri: 'http://theapp.com/close-popup.html',
},
function(response) {
	if (response && response.post_id) 
		console.log("Share has been made!");
});

问题: 在共享对话框后,页面在URL https://m.facebook.com/v2.2/dialog/feed上的白色空白页面上停止。我试图将redirect_uri添加到重定向到某种关闭页面,但它不起作用。

这里有什么想法吗?

FB.ui({
	method: 'feed',
    display: 'touch' //Works with Chrome iOS/Android, page/popup for desktop
	name: 'The title',
	link: 'http://link.com',
	picture: 'http://link.com/image.jpg',
	caption: 'The caption',
	description: 'The description',
	redirect_uri: 'http://theapp.com/close-popup.html',
},
function(response) {
	if (response && response.post_id) 
		console.log("Share has been made!");
});

1 个答案:

答案 0 :(得分:1)

我发现了问题。方法ui将使用display:' touch'作为移动设备上的默认设置,但iOS和Android上的Chrome不会应用此功能,因此如果您定义display:' touch'它适用于Safari和Chrome移动版。另一个问题是显示:'触摸'即使在桌面上也会显示移动界面,因此您必须使用页面或弹出桌面版本来定义显示。

相关问题