new*_*ima 7 xcode facebook image ios
我无法在Facebook上请求大版本的用户个人资料图片..在我的图表路径中我正在做:
NSString *requestPath = @"me/?fields=first_name,last_name,gender,email,birthday,verified,picture";
Run Code Online (Sandbox Code Playgroud)
那里的图片字段只给我一个小版本的个人资料图片,但我需要大型和普通版本..我已经尝试将图片更改为picture_large,pic_large,image_large但这些都不起作用..
拜托,我已经阅读过这些文件了,所以如果你打算再告诉我,请不要再回答了.我在这里问这个问题,因为我已经到处搜索过,找不到解决办法.
谢谢,牛顿
Mur*_*gat 31
你正在寻找的简短答案是 picture.type(large)
我一直在寻找同样的东西,结果发现使用Facebook的发现图形API浏览器中的答案在这里.
现在,如果我使用以下代码:
[FBRequestConnection startWithGraphPath:@"me"
parameters:[NSDictionary dictionaryWithObject:@"picture.type(large),id,email,name,username"
forKey:@"fields"]
HTTPMethod:@"GET"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error){[self fbRequestCompleted:result];}];
Run Code Online (Sandbox Code Playgroud)
"结果"字典中的"图片"键具有大图片URL的值.
Nit*_*mer 20
你可以使用:
http://graph.facebook.com/USER/picture?type=large
Run Code Online (Sandbox Code Playgroud)
当用户可以是用户ID或用户名.
这将返回到静态图像URL的重定向,如User对象文档中所写:
HTTP 302重定向到用户的个人资料图片的URL(使用?type = square | small | normal | large来请求不同的照片).
小智 6
Nitzan Tomer对iOS的反应仍然正确; 如果你想使用Facebook的iOS API获取用户个人资料图片的大版本,你可以写:
[facebook requestWithGraphPath:@"me/picture" andParams:[NSMutableDictionary dictionaryWithObject:@"large" forKey:@"type"] andDelegate:self];
Run Code Online (Sandbox Code Playgroud)
您将在此委托方法中获取结果对象中的图像数据:
- (void)request:(FBRequest*)request didLoad:(id)result
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8964 次 |
| 最近记录: |