Tan*_* Vu 6 facebook-graph-api ios
我在facebook上有用户的id.现在我希望在iOS 上的链接https://graph.facebook.com上获得用户头像.
尝试通过此链接使用:
https://graph.facebook.com/user_id/picture?type=normal
Run Code Online (Sandbox Code Playgroud)
希望这有效.
NSString *urlStr = [NSString stringWithFormat:@"http://graph.facebook.com/%@/picture?type=large", userId];
NSURL *url = [NSURL URLWithString:urlStr];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *image = [UIImage imageWithData:data];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4556 次 |
| 最近记录: |