Facebook API,如何获得朋友的关系状态(单身,已婚等)? [英] Facebook API, how to get relationship status of friends(single, married, etc...)?

查看:140
本文介绍了Facebook API,如何获得朋友的关系状态(单身,已婚等)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我的Facebook API,如何获得朋友的关系状态(单身,已婚,等等)?



感谢任何帮助。 / p>

解决方案

您只需要使用 user_relationships ,请致电 https:/ /graph.facebook.com/YOURFRIEND-ID ,并检查返回的JSON字符串中的relationship_status。
只要记住,如果你的朋友没有将他的关系数据填充到他的个人资料中,那么返回的用户信息就不会有relationship_status。


could somebody help me with Facebook API, how to get relationship status of friends(single, married, etc...)?

Thanks for any help.

解决方案

You just need to get an access token with user_relationships, call https://graph.facebook.com/YOURFRIEND-ID and check "relationship_status" in the returned JSON string. Just have in mind that if your friend didn't filled his relationship data into his profile, there will be no "relationship_status" at the returned user info.

这篇关于Facebook API,如何获得朋友的关系状态(单身,已婚等)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆