私はfacebook friendsのプロフィール画像を取得したいと思います。私はコードでこれを行うことができることを知っているユーザーのIDを取得し、このリンクを使用して:userID/picture "> http://graph.facebook.com/ userID /写真。より簡単な方法は、 SDK?ios、facebook and getting profile画像
0
A
答えて
1
何プロフィール画像のURLを取得する方法について?その後のようなものを使用しますSDWebImageイメージを表示してデバイスにキャッシュするか、URLを渡すだけでイメージを表示してキャッシュできるオープンソースライブラリ?
あなたの友人のuserIDを取得するs。それらをNSArrayに保存します。 fqlを作成します。
-(void)getFriendsInfo:(NSArray*)userIDs
{
//prepare param
NSMutableString *paramStr = [[NSMutableString alloc]init];
for (int i = 0; i<[userIDs count]; i++) {
if ([[userIDs objectAtIndex:i] isKindOfClass:[NSDecimalNumber class]]) {
NSString *tempParam = [NSString stringWithString:[[userIDs objectAtIndex:i]stringValue]];
[paramStr appendFormat:@"'%@',", tempParam];
}
}
[paramStr appendFormat:@"%@",@"'9999999999999'"];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:@"SELECT uid, name, pic FROM user WHERE uid IN (%@)", tempParam], @"query",
nil];
//in my case, I declared Facebook *facebook; in my app delegate using the latest fb sdk
MyAppDelegate *delegate = (MyAppDelegate *) [[UIApplication sharedApplication] delegate];
[[delegate facebook] requestWithMethodName:@"fql.query"
andParams:params
andHttpMethod:@"POST"
andDelegate:self];
}
デリゲートメソッド
- (void)request:(FBRequest *)request didLoad:(id)result
内のデータを扱います
2
のFacebook SDKは、そのグラフに同じユーザーIDとパスを使用しています。だから私はそれが簡単ではないと思います。しかし、同じ。
関連する問題
- 1. merge facebook profile with text and image
- 2. Facebookの画像圧縮iOS SDK
- 3. Facebook PHP画像
- 4. サイズ変更facebook profile image
- 5. のiOS:画像
- 6. 画像は、Facebookの
- 7. Facebookアプリケーション - ユーザー画像?
- 8. Facebookのタブ画像
- 9. CloudKit for Website and iOS
- 10. iOSのFacebook投稿用に高品質の画像を表示
- 11. iOS Facebook SDK - 友達のプロフィールの画像を取得する
- 12. iOS&Facebook:壁にユーザーのコメントとともに画像をアップロード
- 13. のiOS:画像ラベル
- 14. iOS - アニメーションエフェクト - 画像ポップアップ
- 15. 画像はiOSの
- 16. グラフAPI iOS画像
- 17. iOSルーピング画像スライドショー
- 18. iOSのユーザークロップ画像
- 19. Facebook Places and Rails
- 20. iPhone Cocos2D - facebook、twitter and flickr
- 21. iOS 5 and Three20 SDK
- 22. Facebookデバッガツールog:type:og:type:musicianの代わりにprofile:
- 23. Facebookの画像は問題
- 24. Og:画像とFacebookのリンクサムネイル
- 25. は、Facebookのプロフィール画像サイズ
- 26. Facebookスタイルの画像ギャラリー
- 27. Facebook apps and herouku cloud
- 28. TestFlight Access Profile(iOS)をインストールできない
- 29. 画像IOエラーは、iOS
- 30. iOS:カスタムUISliderの画像サイズ