2011-12-27 17 views

答えて

2

私は次のようにそれが答え&を見つけました:

NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
           @"select uid,name,birthday_date from user where uid in (select uid2 from friend where uid1=me())", @"query", 
           nil]; 
[[StaticFacebook getFacebook] requestWithMethodName: @"fql.query" 
         andParams: params 
        andHttpMethod: @"POST" 
        andDelegate: self]; 
+0

おめでとうを!あなたの答えが私を助けたよ! &私の友人と彼が他の人に助けてくれるのを助けるのに役立った:D:P –

3

は、以下にお試しください:

[facebook requestWithGraphPath:@"me/friends" 
         andParams:[ NSDictionary dictionaryWithObjectsAndKeys:@"picture,id,name,link,gender,last_name,first_name",@"fields",nil] 
         andDelegate:self]; 

は、私は、クエリ/困難な場合には知らせてください。

時には、 誕生日の値は「null」または「月&」または「完全な日付」のようになります。したがって、手動でチェックする必要があります。

月額&日付のみを表示する必要があるという要件が1つあります。

あなたは機能の下から、それを確認することができます。

ここ
+(NSString *)getShortDate:(NSString *)pstrDate{ 
    NSArray *arrayDateData = [pstrDate componentsSeparatedByString:@"/"]; 
    NSString *strShortDate = @""; 
    if([arrayDateData count]>=2){ 
     strShortDate = [NSString stringWithFormat:@"%@/%@", [arrayDateData objectAtIndex:0], [arrayDateData objectAtIndex:1]]; 
    } 
    return strShortDate; 
} 

は、「pstrDate」日付値は、Facebookの誕生日の日付値です。

私はそれがあなたに役立つことを願っています。

乾杯。

2

取得friends_birthdayグラフAPIを使用して:

[facebook requestWithGraphPath:@"me/friends?fields=id,name,gender,picture,birthday" andDelegate:self]; 

と、このような権限を追加:

_permissions = [[NSArray arrayWithObjects: 
        @"read_friendlists",@"publish_stream ,user_checkins", 
        @"friends_checkins", @"publish_checkins",@"email", nil] 
       retain]; 
関連する問題