javascript - Facebook SDK change display type in the FB.login()
问题描述
I'm working on the Facebook Login integration into my website and I've done everything which was necessary to achieve this and described in the Facebook documentation
So I'm using FB.login() method
export function facebookLogin() {
return new Promise((res: any, rej: any) => {
// TODO: maybe it might be moved to some dedicated API file? But we don't want to use it anywhere else
FB.login((response: FacebookLoginCallbackResponse) => {
if (response.authResponse) {
res(response.authResponse);
} else {
rej();
}
}, {scope: "public_profile, email"});
});
}
It works fine but when the popup is opened (and it's really big. I would like to make it smaller) the warning shows at the bottom of window.
You are using a display type of 'page' in a small browser window or popup. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment
The question is: How to change it? There is no option TYPE in the Login Dialog parameters. I didn't found anything about this possibility in the Login Dialog documentation. Can someone give me some tip, please?
解决方案
推荐阅读
- excel - 逗号分隔条目上的数据验证?
- swift - 标签未更新
- excel - 关闭不同的工作簿结束当前工作簿的代码执行
- python - 如何在 tkinter 上更新 ttk 进度条
- javascript - OWl-Carousel 移动版
- r - 在 plotly 中禁用 scatterplot3d 中的渐变
- terraform - 如何为 EC2 实例分配唯一的“名称”标签?
- pandas - 使用 pandas 在系列中创建一个包含今天日期和日期 +1 的列
- javascript - 如何使用 ES6 在 javascript 中删除或添加项目到锯齿状数组?
- php - 为什么我在获取 API 中的变量值时出错?