gpt4 book ai didi

ios - FB ios SDK-3.0+-如何为[FBSession.activeSession openWithBehaviour:completedHandler]添加权限?

转载 作者:行者123 更新时间:2023-12-01 17:26:06 24 4
gpt4 key购买 nike

由于我不希望后备流程以iOS6登录对话框开头,因此我使用了

[FBSession.activeSession openWithBehaviour: completionHandler] 

但想知道我可以在哪里添加权限参数,就像下面方法中的 @"basic_info"@"user_like"一样:
[FBSession openActiveSessionWithReadPermissions:@[@"basic_info", @"user_like"]
allowLoginUI:YES
completionHandler:^(FBSession *session,
FBSessionState status,
NSError *error) {
// Respond to session state changes,
// ex: updating the view
}];

感谢您的任何建议。

最佳答案

这是-

  • 读取权限
    ...
    [FBSession.activeSession requestNewReadPermissions:@[@"basic_info",@"user_likes"]
    completionHandler:^(FBSession *session,
    NSError *error)
    {
    // Handle new permissions callback
    }];
    ...
  • 发布权限
    ...
    [FBSession.activeSession requestNewPublishPermissions:@[@"basic_info",@"publish_actions"]
    defaultAudience:FBSessionDefaultAudienceFriends
    completionHandler:^(FBSession *session,
    NSError *error)
    {
    // Handle new permissions callback
    }];
    ...
  • 关于ios - FB ios SDK-3.0+-如何为[FBSession.activeSession openWithBehaviour:completedHandler]添加权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18387223/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com