【发布时间】:2016-06-22 15:11:37
【问题描述】:
我正在尝试使用 Linkedin SDK 对用户进行身份验证,我已遵循指南 here(官方)。
因此,在我的 info.plist 中,我已按照说明插入了我的个人 AppId。
然后我在https://www.linkedin.com/developer/apps//mobile inserting 处编辑了应用设置:
- iOS Bundle 标识符(与我在 Xcode 项目中的标识符相同)
所以,我将一个 UIButton 操作链接到这部分代码:
LISDKSessionManager.createSessionWithAuth(self.permissions, state: nil, showGoToAppStoreDialog: true, successBlock: { (state: String!) -> Void in
print("Login \(state)"
}, errorBlock: { (error: NSError!) -> Void in
print("Login error: \(error)")
})
点击后,Linkedin应用会打开,认证后会自动返回应用,报错:
登录错误:Error Domain=LISDKAuthError Code=5 "(null)" UserInfo={errorDescription=请求范围无效,未知, 格式错误,originalDomain=LISDKServerError,errorInfo=invalid_scope}
我错过了什么?
我尝试了 SDK 中的示例应用程序并且可以正常工作,但我无法找出其中的差异。
应用设置内部是否存在差异? (在 www.linkedin.com/developer/apps/)
【问题讨论】:
标签: objective-c xcode swift oauth linkedin