0

I have implemented Facbook SDK framework 3.8 to fetch the photos from Facebook and it has been also approved from Facebook. My App is working very well in every version of iOS. But it is not working in iOS9.2 it always ask with an alert that "App wants to access your Facebook photos", whereas i have already given permission to access that. But repeatedly alert is coming in iOS9.2 only. I also see in console that there are so many errors.

  1. -canOpenURL: failed for URL: "fb267453465127://" - error: "This app is not allowed to query for scheme fb267453465127".
  2. -canOpenURL: failed for URL: "fb164705030244434://" - error: "This app is not allowed to query for scheme fb164705030244434".
  3. -canOpenURL: failed for URL: "fb299473330131984://" - error: "This app is not allowed to query for scheme fb299473330131984".
  4. failed for URL: "fb1b1cca46cd75ebc75ad67e6904d5f176://" - error: "This app is not allowed to query for scheme fb1b1cca46cd75ebc75ad67e6904d5f176".

Whereas I have already done process for ios9 as described here https://developers.facebook.com/docs/ios/ios9

Why I am getting an alert so many times "App" would like to access your basic profile info and list of fiends and access your photos" whereas i already given permission.

I also see an error in console while i was getting response of FBAPI ->>

JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=5 \"Unescaped control character '0x0'\" UserInfo={NSLocalizedDescription=Unescaped control character '0x0'}",
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key: id\" UserInfo={NSLocalizedDescription=Object value expected for key: id, NSUnderlyingError=0x140851570 {Error Domain=org.brautaset.JSON.ErrorDomain Code=5 \"Unescaped control character '0x0'\" UserInfo={NSLocalizedDescription=Unescaped control character '0x0'}}}"

Please help me .... Thanks in Advance.

4

1 回答 1

0

After so much of struggle now i fixed my issue. As this code is written by another developer and his parsing mechanism was not appropriate to parse FBAPI response.

I have fixed issue with below written code-

   NSString *decodedString = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
     NSData * jsonData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
     NSError * error=nil;
     NSDictionary * parsedData = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&error];
     NSLog(@"parsedData->>%@",parsedData);

I think because of parser issue i was getting this error-

JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=5 \"Unescaped   control character '0x0'\" UserInfo={NSLocalizedDescription=Unescaped control character '0x0'}",
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key: id\" UserInfo={NSLocalizedDescription=Object value expected for key: id, NSUnderlyingError=0x140851570 {Error Domain=org.brautaset.JSON.ErrorDomain Code=5 \"Unescaped control character '0x0'\" UserInfo={NSLocalizedDescription=Unescaped control character '0x0'}}}"

Now this is error free !!!! you can use fixed code as i have written for parsing.

于 2016-02-16T09:54:19.507 回答