私は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. Admob and facebook mediation IOS
- 3. web-ext、profile and IndexedDB
- 4. Facebookの画像圧縮iOS SDK
- 5. Facebookのプロフィール画像は、iOSデバイス
- 6. iOS:プロフィール画像をFacebookに設定
- 7. @ProfileアノテーションのAND演算子
- 8. image profile facebook to base64 PHP
- 9. iOS Swift Getting Lazy Map Collection Values
- 10. Facebook画像フォーマット?
- 11. Facebook PHP画像
- 12. Facebookメッセンジャーボットフレーム画像
- 13. Omniauth Facebook画像
- 14. iOS Provisioning Profile(InHouse)Enterprise
- 15. サイズ変更facebook profile image
- 16. AWS Lex and Facebook - コンテンツタイプ
- 17. Laravel Intervention画像とFacebookの画像
- 18. Facebookのコメントランダム画像
- 19. Facebookのタブ画像
- 20. Facebookアプリケーション - ユーザー画像?
- 21. Facebookのメタデータ画像
- 22. 画像は、Facebookの
- 23. C#Facebook SDK画像取得画像無しfacebookレスポンス
- 24. 画像は、iOS
- 25. iOSマルチタスクアプリケーションスイッチャーカスタム画像
- 26. のiOS:画像
- 27. のiOS - 画像
- 28. iOSのFacebook投稿用に高品質の画像を表示
- 29. iOS&Facebook:壁にユーザーのコメントとともに画像をアップロード
- 30. iOS Facebook SDK - 友達のプロフィールの画像を取得する