我做了一个 FB.login,范围是“public_profile、email、user_friends”。
function fb_login() {
FB.login(function(response) {
console.log(response);
}, {scope: 'public_profile,email,user_friends'});
}
window.fbAsyncInit = function() {
FB.init({
appId : 'xxxxxxxxxxx',
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse social plugins on this page
version : 'v2.1' // use version 2.1
});
}
同样在页面上我有一个 Facepile 插件。
<div class="fb-facepile" data-app-id="xxxxxxxxxxx" data-width="400" data-max-rows="1" data-colorscheme="light" data-size="large" data-show-count="true"></div>
用户可以正常连接。但是,如果这些朋友也已连接,则用户无法在 Facepile 中看到他们的朋友。如果用户登录 Facebook 并转到应用程序设置,该应用程序会在此处列出,但可见性设置为“仅限我”。如果他们手动将应用程序的可见性更改为“朋友”,则用户的朋友才能在 Facepile 中看到此人。
如何配置应用程序或登录过程以将可见性设置为“朋友”,以便用户不必手动执行此操作?