所以我正在学习node.js和facebook身份验证,我遇到了这个错误:
/home/lindan4/Git/HelloNodeJS/ChatTime/node_modules/passport-oauth2/lib/strategy.js:79
if (!verify) { throw new TypeError('OAuth2Strategy requires a verify callback'); }
^
TypeError: OAuth2Strategy requires a verify callback
at Strategy.OAuth2Strategy (/home/lindan4/Git/HelloNodeJS/ChatTime/node_modules/passport-oauth2/lib/strategy.js:79:24)
at new Strategy (/home/lindan4/Git/HelloNodeJS/ChatTime/node_modules/passport-facebook/lib/strategy.js:55:18)
at module.exports (/home/lindan4/Git/HelloNodeJS/ChatTime/app/auth/index.js:42:16)
at Object.<anonymous> (/home/lindan4/Git/HelloNodeJS/ChatTime/server.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)
at startup (internal/bootstrap/node.js:308:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:878:3)Run Code Online (Sandbox Code Playgroud)
这是代码:
'use strict';
const passport = require('passport');
const config = require('../config');
const FacebookStrategy = require('passport-facebook').Strategy;
const helper = require('../helpers');
module.exports = () => …Run Code Online (Sandbox Code Playgroud)每当我尝试设置 LinearLayout 的高度时,我总是会遇到以下异常:
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
LinearLayout.LayoutParams hide = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0);
LinearLayout.LayoutParams show = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 100);
driverMainOptions.setLayoutParams(hide);
mapDirections.setLayoutParams(show);
Run Code Online (Sandbox Code Playgroud)
是否需要特定的导入语句才能正确执行?