con*_*are 18 permissions authorization facebook-graph-api ios facebook-oauth
我正在使用iOS内置框架进行连接.在询问"publish_stream"权限后,FB返回错误:
Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The app must ask for a basic read permission at install time." UserInfo=0x145ad6a0 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The app must ask for a basic read permission at install time.}
Run Code Online (Sandbox Code Playgroud)
这里发生了什么?显示两个用户权限弹出窗口的用户体验不太理想.
C A*_*thy 17
第一次,您必须要求读取权限.您最初无法使用任何类型的发布/写入权限授权用户.之后您应该做的是,在您的应用中有意义的地方,请求publish_stream权限.绝对不要做初始权限,然后立即请求publish_stream权限.
请参阅https://developers.facebook.com/docs/tutorial/iossdk/upgrading-from-3.0-to-3.1/,"单独请求读写权限"部分中的此注释.即使这适用于iOS的Facebook SDK,它也是内置框架中相同要求的扩展.
我想补充一点,Facebook文档中还有一个警告:
// if a user has *never* logged into your app, you MUST include one of
// "email", "user_location", or "user_birthday". Other read
// permissions can also be included here.
Run Code Online (Sandbox Code Playgroud)
如果不这样做会导致同样的错误.