最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Get Facebook PageProfile URL - Stack Overflow

programmeradmin0浏览0评论

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.

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.

I'm new to FB and other social network APIs. 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.

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.

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.

I'm new to FB and other social network APIs. 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.

Share edited Oct 29, 2014 at 16:32 Stéphane Bruckert 23k14 gold badges99 silver badges135 bronze badges asked Jan 8, 2013 at 9:48 Kong Jin JieKong Jin Jie 5355 silver badges11 bronze badges 0
Add a ment  | 

2 Answers 2

Reset to default 7

A simple Graph API request gives you the user profile link.

/me?fields=link

Result:

{
  "link": "https://www.facebook./profile.php?id=XXXXX", 
  "id": "XXXXX"
}, 
{
  "link": "https://www.facebook./first.last", 
  "id": "YYYYY"
}

Learn how to use the Graph API here: https://developers.facebook./docs/reference/api/

You should go through the below link it explains alot ,you can extract information from Facebook using Fql and get all the necessary info for registering user with your site. I have also used it in my website 2shar.in

Facebook javascript api example

发布评论

评论列表(0)

  1. 暂无评论