Search code examples
iosfacebookuitableviewfacebook-ios-sdk

iOS - Reading Facebook Posts in UITableView


I am trying to show a Facebook page posts using UITableView. Is there a way for that in iOS 5 or 6?


Solution

  • You need to get a OAuth Token and get the JSON Feed from the OpenGraph

    For the OAuth Token:

    https://graph.facebook.com/oauth/access_token?client_id=<client_id here>&client_secret=<client_secret here>&grant_type=client_credentials
    

    and for the feed:

    https://graph.facebook.com/<facebook_page_id>/feed/?access_token=<oauth_token>
    

    You get an JSON Array back and can parse it using your favorite JSON Parser. In Addition you can explore the open graph using this tool:

    https://developers.facebook.com/tools/explorer/
    

    Hope that helps. Happy iCoding.