Good day. Prompt please who understands a question of defaultAudience for FBSDK. As far as I understand, this parameter sets - who can read what the application publishes. But it turns out that even when installing FBSDKDefaultAudienceOnlyMe - a post with accessibility for friends is published on the page in FB. Where is the mistake??

- (void)viewDidLoad { [super viewDidLoad]; FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init]; loginButton.defaultAudience = FBSDKDefaultAudienceOnlyMe; loginButton.center = self.view.center; loginButton.delegate = self; self.loginButton = loginButton; [self.view addSubview:loginButton]; } 

and actually POST itself

 NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@"hello", @"message", nil]; FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me/feed" parameters: dict HTTPMethod:@"POST"]; [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { }]; 
  • one
    error most likely in the code - Max Mikheyenko
  • maybe look plz code added - MxTM
  • I will assume that although you have requested accessibility on onlyMe, in the numbering, friends go as 0, apparently you need to pass a parameter to change this for the post - Max Mikheyenko
  • I tried directly through FBSDKLoginManager - I set defaultAudience in the post method - the result is the same - MxTM
  • nobody can help - MxTM

0