开发者

How to access user's profile page using access token?

I am creating an iOS app that displays the user's faceb开发者_开发技巧ook profile after post feeds and photos through my app. I used facebook single-sign-on to get access token for posting.

I am wondering how i can display user's profile page though web browser without login. Does access token i got from single-sign-on can be used here to view the user's facebook profile page? if it does, how? If not, what is the alternative. I have struggled for a few days, and cannot get it work.

Many thanks in advance!


If you need to display a user Facebook page the only thing you need is the user Id. You have two ways of get the user Id:

1) User allows your Facebook Application and gives you rights. Then get the userId.

For this to work you need ask the user for privileges to the user and the callback you get the userId via GraphAPI or javascript SDK.

2) You know the user you want to show on the webView.

Knowing who you want to show or not, the only thing you have to do to show someones facebook profile page is calling http://www.facebook.com/{userID} like http://www.facebook.com/4

If that is not what you need, please give us some code or give a deeper explanation of your issue.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜