我想知道在使用发布到墙弹出对话框后是否可以将某人重定向到不同的选项卡 url。
当前发布到墙上的脚本。
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: APPID,
status: true,
cookie: true,
xfbml: true}); };
(function() {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script>
function publish_to_wall(){
FB.ui({
method: 'stream.publish',
display: 'iframe',
name: ('some text ') + (document.getElementById('myText').value) +(' some text'),
caption: 'some caption',
link: 'some url',
picture:'some image url'
});
}
</script>
重定向必须在 iframe 内进行。所以在有人将帖子发布到他/她的墙上后,人们会被重定向到感谢页面。