Search code examples
iosobjective-cfacebookfacebook-graph-apifacebook-ios-sdk

how to display facebook news feeds in ios without Login?


I need to display facebook feeds in ios. For example I need to display the feeds of "https://www.facebook.com/Google" in a view.

I followed this link but the solution here displays only the full page? Is there any other way to display the feeds alone? without asking for login?


Solution

  • To get feeds from a Facebook page, you can use FacebookGraphAPI.
    You don't need to LogIn to get the feeds, you can fetch the feeds from a page by using the url:

    https://graph.facebook.com/Google/feed?access_token=YourAcessToken .

    Replace the 'YourAccessToken" with a real access token which you can get by registering your application at developers.facebook.com.
    This will return a JSON which you can parse and get the feeds.

    Regards

    NB: Here, in this sample URL I had used "Google" as the facebook page name for your requirement, you can change it with the name of the page from which you need to get feeds.