I am trying to get Feed to enter the custom timeline. I have a login button to which I pass read permissions, including user_posts . Surprisingly, Facebook does not grant me this permission and ignores it.
The code:
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.loginButton.readPermissions = @[@"public_profile", @"email", @"user_friends", @"user_posts"]; self.loginButton.delegate = self; if([FBSDKAccessToken currentAccessToken]) { NSLog(@"Have access token"); NSLog(@"permissions .... %@",[FBSDKAccessToken currentAccessToken].permissions); [self retrieveFeed]; } }
When I click the login button, I get the following permissions screen. Facebook ignored the permission of user_posts .

Even if I try to get this permission later after logging in, Facebook informs me that I already allowed the application to do this, even if there is no such permission! Code for obtaining a new permit:
-(void) checkForFeedPermission { if ([[FBSDKAccessToken currentAccessToken] hasGranted:@"user_posts"]) { NSLog(@"already granted feed access"); [self retrieveFeed]; } else { FBSDKLoginManager *loginManager = [[FBSDKLoginManager alloc] init]; [loginManager logInWithReadPermissions:@[@"user_posts"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { NSLog(@"requesting feed access"); [self retrieveFeed]; }]; } }
I hit my head about this issue for three days. Please suggest me where can I be wrong? Thanks.
source share