slrequest中的app id

时间:2013-06-04 10:31:11

标签: iphone ios facebook

使用SLRequest与Facebook集成时是否必须使用app Id实际上我没有App id,因此可以使用SLRequest集成Facebook而不使用app id作为我没有注册的iTunes帐户?

-(void)viewDidLoad
 {
    self.accountStore = [[ACAccountStore alloc]init];
    ACAccountType *FBaccountType= [self.accountStore accountTypeWithAccountTypeIdentifier:
    ACAccountTypeIdentifierFacebook];
    NSString *key = @"987654"; 
    NSDictionary *dictFB = //use ACAccountStore to help create your dictionary
   [self.accountStore requestAccessToAccountsWithType:FBaccountType options:dictFB
   completion: ^(BOOL granted, NSError *e) {
   if (granted) {
       NSArray *accounts = [self.accountStore accountsWithAccountType:FBaccountType];
       //it will always be the last object with SSO
       self.facebookAccount = [accounts lastObject];
     } 
     else {
       //Fail gracefully...
       NSLog(@"error getting permission %@",e);
     }
  }];

1 个答案:

答案 0 :(得分:1)

此处appId表示Facebook Client Id。在Facebook developer account中,您将获得App ID/API Key,您可以在其中创建应用程序。