使用SLRequest集成Facebook时是否强制使用app Id实际上我没有App id,那么可以不使用app id使用SLRequest集成Facebook吗?因为我没有注册的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);
}
}];发布于 2013-06-04 18:34:09
这里的appId指的是Facebook Client Id。在Facebook developer account中,您将获得用于创建应用程序的App ID/API Key。
https://stackoverflow.com/questions/16915541
复制相似问题