0

When i am logging using two permissions: @"publish_actions",@"publish_stream" and want to post on facebook. Please help me to resolve i have checked and applied many stackoverflow solutions but none of them worked.My facebook SDK version is: 3.21

        +(void)postFBShare:(NSString *)sArticle
        {

            NSDictionary *params = @{
                                     @"name" : @"Feed A Puppy",
                                     @"description" : @"Download Feed a puppy on iTunes",
                                     @"link" : @"http://google.com",
                                     @"message" :sArticle,
                                     };

      [FBRequestConnection startWithGraphPath:@"me/feed"
                                         parameters:params
                                         HTTPMethod:@"POST"
                                  completionHandler:^(FBRequestConnection *connection,
                                                      NSDictionary * result,
                                                      NSError *error) {
                                      if (error) {
                                          NSLog(@"Error occurred: %@", [error localizedDescription]);
                                      } else {
                                          NSLog(@">>> FB Shared successfully::%@",result);
                                          UIAlertView* alert = [[UIAlertView alloc]initWithTitle:@"Alert!" message:@"Shared successfully." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

                                          [alert show];

                                      }
                                  }];
}
Zalak Patel
  • 1,937
  • 3
  • 26
  • 44

1 Answers1

0

You may be missing permissions required for the endpoint. Also check if you have an open FBSession.

i-konov
  • 842
  • 1
  • 7
  • 19