を誕生日に、私は、私は友人の誕生日を取得するために私の代わりに何を書くべき友人の誕生日FacebookのグラフAPIの友人、私は多くのことを検索
[facebook requestWithGraphPath:@"me" andDelegate:self];
を得ることに成功していませんでした。 おかげ
を誕生日に、私は、私は友人の誕生日を取得するために私の代わりに何を書くべき友人の誕生日FacebookのグラフAPIの友人、私は多くのことを検索
[facebook requestWithGraphPath:@"me" andDelegate:self];
を得ることに成功していませんでした。 おかげ
私は次のようにそれが答え&を見つけました:
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];
は、以下にお試しください:
[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の誕生日の日付値です。
私はそれがあなたに役立つことを願っています。
乾杯。
取得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];
おめでとうを!あなたの答えが私を助けたよ! &私の友人と彼が他の人に助けてくれるのを助けるのに役立った:D:P –