我想在我的應用中從Facebook獲取Notes的內容。我正在使用Facebook API版本V2.0。無法從IOS中的Facebook中獲取Notes的內容
我已經嘗試使用Graph API和FQL查詢來獲取Notes的內容,但它給出的錯誤提示「注意API已棄用於版本v2.0和更高版本」。
請幫我解決問題。
下面是使用圖形API的代碼,我已經使用「user_notes」
- (void) makeRequestForUserNotes {
[FBRequestConnection startWithGraphPath:@"me/notes"
completionHandler:^(FBRequestConnection *connection,
id result, NSError *error) {
if (!error) {
// Success! Include your code to handle the results here
NSLog(@"user Notes Response: %@", result);
// read data value from result
NSMutableArray *dataArr = [[NSMutableArray alloc]init];
dataArr = [result objectForKey:@"data"];
if([dataArr count] != 0) {
// get value from contents
}
} else {
// An error occurred, we need to handle the error
// Check out our error handling guide:
// https://developers.facebook.com/docs/ios/errors/
NSLog(@"error %@", error.description);
}
}];
}
這裏直接給予執行的是「筆記API已被棄用的版本V2.0及更高版本」後的錯誤認證。
更容易幫助如果您向我們展示您嘗試的代碼,即使它不起作用。其他問題應該說明你期望答案是完美的工作代碼。 –