使用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);
}
}];
答案 0 :(得分:1)
此处appId表示Facebook Client Id
。在Facebook developer account中,您将获得App ID/API Key
,您可以在其中创建应用程序。