[英]Get Facebook Page / Profile URL
I am currently building an application which also allow users to specify their profile URLs for the various social network such as Facebook, Twitter, Google+ and etc. I will focus this question on Facebook instead for the start. 我目前正在构建一个应用程序,该应用程序还允许用户为各种社交网络(例如Facebook,Twitter,Google +等)指定其个人资料URL。我将首先将问题集中在Facebook上。
To allow users to easily input their profile links easily, I will like to have a button on their "Settings" page which they will login to their Facebook account, select the page or profile and it will automatically fill in the Textfield. 为了使用户能够轻松轻松地输入其个人资料链接,我希望在“设置”页面上有一个按钮,他们可以登录到其Facebook帐户,选择该页面或个人资料,它将自动填写文本字段。
I'm new to FB and other social network APIs. 我是FB和其他社交网络API的新手。 It will be good if there is some samples or a documentation I can read up.
如果有一些样本或我可以阅读的文档会很好。 I've spend sometime on the documentation but don't find anything that mention this.
我花了一些时间在文档上,但是找不到任何提及此内容的东西。
A simple Graph API request gives you the user profile link. 一个简单的Graph API请求为您提供了用户个人资料链接。
/me?fields=link
Result: 结果:
{
"link": "https://www.facebook.com/profile.php?id=XXXXX",
"id": "XXXXX"
},
{
"link": "https://www.facebook.com/first.last",
"id": "YYYYY"
}
Learn how to use the Graph API here: https://developers.facebook.com/docs/reference/api/ 在此处了解如何使用Graph API: https : //developers.facebook.com/docs/reference/api/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.