哪个Facebook课程用于检索iPhone iOS 6中的提要



我正在我的本机iOS应用程序iOS 6,

我能够使用FBFriendpickerviewController类检索Facebook朋友列表, 而且我可以使用FBPlacePickerviewController类的位置附近检索,现在我想检索Facebook Feeds我应该使用哪个类。

请帮助我。

您可以使用API

http://www.new.facebook.com/feeds/notifications.php?id= your_facebook_id& viewer = your = your_facebook_id& yy_internal_key&your_internal_key& format = rsss20

这是我在API上方找到的链接。希望能帮助到你。

您需要使用slrequest类,并将其指向需要信息的任何图形API端点。

ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *facebookAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:@"YOUR_FACEBOOK_APP_ID", ACFacebookAppIdKey,
                         nil];
[accountStore requestAccessToAccountsWithType:facebookAccountType options:options completion:^(BOOL granted, NSError *error) {
    if(granted) {
        ACAccount *account = [[accountStore accountsWithAccountType:facebookAccountType] lastObject];
        NSDictionary *parameters = @{};
        NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/SOME_GRAPH_ENDPOINT"];
        SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook
                                                requestMethod:SLRequestMethodGET
                                                          URL:url
                                                   parameters:parameters];
        request.account = account;
        [request performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
            NSError *jsonerror;
            NSDictionary *myData = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&jsonerror];
        }];
    } else {
        NSLog(@"error: %@, %@",error,[error description]);
    }
}];

最新更新