我正在使用Facebook SDK FB.ui.我可以使用FB.ui传递一个参数,以便它与响应对象一起返回吗?
我目前的尝试:
FB.ui({
method: 'stream.publish',
message: message,
display: 'popup', // force popup mode
data: "shared_item_id=96"
},
function(response) {
alert('Post was published.' + response.share_item_id);
});
是否有将shared_item_id放入响应对象?
答案 0 :(得分:5)
我认为您可以使用关闭:
解决此问题FB.ui({
method: 'stream.publish',
message: message,
display: 'popup' // force popup mode
},
(function(shared_item_id) {
return function(response) {
/* callback body */
//share_item_id = 96
alert('Post was published.' + shared_item_id);
}
})(96/*value you want to have in callback*/)
);