2013-06-04 58 views
0

是否必須使用app Id同時使用SLRequest其實我沒有App id與Facebook整合,所以是有可能使用Facebook的SLRequest集成,而不使用app id因爲我沒有註冊iTunes賬號?應用程序ID在slrequest

-(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

這裏的appId表示Facebook Client Id。在Facebook developer account中,您將獲得App ID/API Key,您將在其中創建您的應用程序。

+0

對不起,我的意思是說iphone應用程序商店ID爲 – user2440960

+0

如果你沒有在iTunes Store中的應用程序,justin Facebook的開發者網站,同時添加你的應用程序的本地iOS,把0應用程序商店ID。 – iCoder4777

+0

不需要。它不需要iPhone應用商店標識。轉到鏈接,我提供了,你需要在那裏創建應用程序來將facebook集成到你的應用程序中,並且你將得到「應用程序ID/API密鑰」將它放入你的代碼中。 –