【发布时间】:2012-02-20 20:59:59
【问题描述】:
如果用户发布,我如何将用户重定向到特定的 URL,如果他跳过,我如何重定向到不同的 URL?
https://www.facebook.com/dialog/feed?
app_id=123050457758183&
link=https://developers.facebook.com/docs/reference/dialogs/&
picture=http://fbrell.com/f8.jpg&
name=Facebook%20Dialogs&
caption=Reference%20Documentation&
description=Using%20Dialogs%20to%20interact%20with%20users.&
message=Facebook%20Dialogs%20are%20so%20easy!&
redirect_uri=http://www.example.com/response
无论用户点击发布还是跳过,上面的示例都会将用户重定向到相同的 URL。
我尝试了下面给出的示例:
<script>
FB.init({appId: " id", status: true, cookie: true});
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
link: 'link to share',
picture: 'gggg',
name: 'ggg',
caption: 'ggg.',
description: 'ggg.'
};
function callback(response) {
document.getElementById('msg').innerHTML = "Post successfully published, Post ID: " + response['post_id'] + " click here";
var str = "Click here to activate your new timeline facebook profile!";
document.write(str.link("redirection url here"));
}
FB.ui(obj, callback);
}
但上面的例子也无法给出结果。
【问题讨论】:
标签: facebook button redirect share publish