1

I am doing some research into the capacity of Facebook Connect. I have some questions on how a couple of bits of functionality.

  1. Is it possible to fetch a list of all friends of a user?

The idea of this is that a user would log in using my site and then they could search through their friends and select one, and the site would get that friends users id and store it to the sites database.

  1. Getting a photos from that user

After getting the friends user id, would it then be possible to get their photos? Or would the friend need to give the site permission to do that?

I am looking into a site where you can buy a greetings card for a friend, and i wanted to know whether my users would be able to login via facebook, pick a friend, get a photo and then at the time of their birthday it would send them a private message (which i think i know how to do) linking them back to my site where they could view the birthday card and their photo.

Thanks

4

1 回答 1

2

要回答您的问题:

  1. 是的。从用户的登录过程中获得访问令牌后,向https://graph.facebook.com/me/friends. 你可以在这里自己测试一下:https ://developers.facebook.com/tools/explorer?method=GET&path=me%2Ffriends

  2. 是的。在登录过程中,您必须请求user_photosfriends_photos 权限,之后您才能使用访问令牌向 Graph API 请求https://graph.facebook.com/USERID/photos。这将仅返回允许用户查看当前隐私设置的朋友的照片。

于 2012-05-29T14:53:01.450 回答