关于这个问题有很多答案,但我找不到正确的解决方案!我有调用登录名的javascript,但没有发布到墙上的权限
window.fbAsyncInit = function() {
FB.init({
appId: '<?php echo $this->getAppID; ?>',
cookie: true,
xfbml: true,
oauth: true
});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
FB.Event.subscribe('auth.logout', function(response) {
window.location.reload();
});
};
(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);
}());
在 php 代码中,它非常简单地添加到数组中,例如:
$facebook->getLoginUrl(array(
'scope' => 'publish_stream' ));
但是我怎样才能将它添加到这个 url 的 javascript 按钮以请求允许发布到用户的墙上