How to use Facebook Photos in an iPhone App?

后端 未结 1 526
陌清茗
陌清茗 2021-01-07 09:52

I have a client who wants to use their Facebook photos in an iPhone app. We want to embed their account into the app so that when people download the app, they see the clien

相关标签:
1条回答
  • 2021-01-07 10:32

    This should be easy. Facebook gives a public URL for albums that are public to be viewed by the Internet without necessity of logging in. You can see this URL al the bottom of the album page that you may want to share.

    It looks like this:

    Share this album with anyone by sending them this public link:
    http://www.facebook.com/album.php?aid=[ALBUM_ID]&id=[USER_ID]&l=[SOME_PARAM]

    (quoted from a public album)

    you can easily leach data and extract images from there.


    However it is more sane to create a Facebook app (takes hardy a minute) and use Facebook graph-API to make REST calls to retrieve all the data about albums and photos within them in well formatted JSON that will be far easier to handle the HTML. Once you have Facebook App in place, you may use it to fetch all the FB data but it violates both of your requirements (1)Not using Facebook app, and (2) user don't have to sign-in.

    But it may worth looking at

    • http://developers.facebook.com/docs/api
    • http://developers.facebook.com/docs/reference/api/album

    Well, there is some trick. If you go to the API page(http://developers.facebook.com/docs/api). Copy the URL given for Coca-Cola album (https://graph.facebook.com/99394368305) and make a request with photos REST command like https://graph.facebook.com/99394368305/photos you can access all the details of all the photos in the album in JSON format. I could not get it work for my personal public album though.

    0 讨论(0)
提交回复
热议问题