gpt4 book ai didi

ios - 如何使用iOS SDK获取Facebook页面封面照片

转载 作者:行者123 更新时间:2023-11-28 19:56:11 27 4
gpt4 key购买 nike

如何使用iOS SDK获取Facebook页面封面照片, 从解析后的 json 结果中,我得到了以下结果,但无法从那里获取封面照片。

{
actions = (
{
link = "https://www.facebook.com/100007281559316/posts/1487360021516702";
name = Comment;
},
{
link = "https://www.facebook.com/100007281559316/posts/1487360021516702";
name = Like;
}
);
"created_time" = "2014-10-10T04:09:22+0000";
description = "Loneliness is a good feeling when it is created by Ourself. But . .it is the worst feeling when it is Gifted by others.\nExpecting your Opinion ekantatha@gmail.com";
from = {
id = 100007281543425252416;
name = "Hari Krishna";
};
icon = "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yD/r/aS8ecmYRys0.gif";
id = "100007281559316_1487360021516702";
link = "https://www.facebook.com/Ekantatha";
message = "https://www.facebook.com/Ekantatha";
name = "\U0d0f\U0d15\U0d3e\U0d28\U0d4d\U0d24\U0d24";
picture = "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xfp1/v/t1.0-1/c6.0.200.200/p200x200/1779801_631456453593885_482158404_n.jpg?oh=8f766377fc71b8e3703e330067a70ebc&oe=54C1FF93&__gda__=1421213700_5f4ec6aea535e630c1a5a1eace45f34b";
privacy = {
allow = "";
deny = "";
description = "Only Me";
friends = "";
networks = "";
value = SELF;
};
properties = (
{
name = Community;
text = "1,102 like this";
}
);
"status_type" = "shared_story";
type = link;
"updated_time" = "2014-10-10T04:09:22+0000";
}

编辑:

我想像这样显示我的手机,所以我需要封面照片。从 json 结果我没有得到页面 ID。如何使用iOS SDK获取页面封面图片?

enter image description here

最佳答案

这是一个更新的解决方案。

var basicUserData = ["fields": "cover,picture,id,birthday,email"]

FBRequestConnection.startWithGraphPath("/me",
parameters: basicUserData,
HTTPMethod: "GET") {
(connection:FBRequestConnection!, result, error) -> Void in
if error != nil {
print(error!)
} else {
print(result!)
}
}

Parse 团队建议通过访问 https://graph.facebook.com/(facebookId)/picture?type=large 获取 FB 个人资料图片确保替换为用户的 Facebook Id。 Here is the discussion

注意事项:

关于ios - 如何使用iOS SDK获取Facebook页面封面照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26292386/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com