Reputation: 11
I'm using the facebook iOS SDK and I keep getting strings of data like "\U9ec3\U6de8\U5a77" in the Graph API. What's wrong? This is the code I'm using:
- (void)request:(FBRequest *)request didLoad:(id)result{
NSLog(@"%@",[result description]);
}
- (void)requestFeed:(NSString *)path withDelegate:(id)delegate{
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat: @"https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=%@&client_secret=%@",APP_ID,APP_SECRET]]];
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *access_token = [[[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding] substringFromIndex:13];
NSLog(@"%@",access_token);
[fb requestWithGraphPath:path andParams:[NSMutableDictionary dictionaryWithObjectsAndKeys:access_token,@"access_token", nil] andDelegate:delegate];
}
Upvotes: 1
Views: 310
Reputation: 30647
Your string '\u9ec3\u6de8\u5a77'
is equivalent to '黃淨婷'
.
This appears to be someone's name in Chinese. According to Google Translate, it is read as "Huáng Jìng-tíng" in Mandarin.
Upvotes: 1