0
在iOS6的張貼訊息這裏我使用ACAccountType and SlRequest
但d =爲了這個,我需要找回一些操作的訪問令牌,無法得到Facebook的訪問令牌在iOS6的
下面是我使用的代碼獲取數據
ACAccountType *FBaccountType= [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
// Specify App ID and permissions
NSDictionary *dictFB = @{
ACFacebookAppIdKey:kAppId,
ACFacebookPermissionsKey: @[@"email",@"publish_stream", @"publish_actions"],
ACFacebookAudienceKey: ACFacebookAudienceFriends
};
[accountStore requestAccessToAccountsWithType:FBaccountType options:dictFB completion:
^(BOOL granted, NSError *e) {
if (granted) {
NSArray *accounts = [accountStore accountsWithAccountType:FBaccountType];
// it will always be the last object with single sign on
facebookAccount = [accounts lastObject];
NSLog(@"facebook account = %@",facebookAccount);
} else {
//Fail gracefully...
NSLog(@"error getting permission %@",e);
}
}];
但是從上面的代碼我得到以下數據唯一 1]型 2]帳戶描述 3]用戶名 4]的ObjectID 5]屬性 6]父帳戶
我怎樣才能使用上面的代碼的訪問令牌在iOS6的
如果我通過比我如何能得到默認的access_token Facebook登錄??? – Satish