Access news feed from Facebook using the iOS SDK

Discussion in 'iPhone/iPad Programming' started by SimonBS, Aug 9, 2011.

  1. macrumors regular

    SimonBS

    Joined:
    Dec 30, 2009
    #1
    Hello,

    I am trying to implement Facebook in my iPhone app and I have successfully authorized the app in the application delegate as shown in Facebook's guide. Now I can easily use Facebook around my application using the code below.

    Code:
    AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    facebook = [appDelegate facebook];
    I would like to get the user's News Feed but when doing so using the following code I get an error.

    [facebook requestWithGraphPath:mad:"me/home" andDelegate:self];
    The error is:

    Code:
    The operation couldn’t be completed. (facebookErrDomain error 10000.)
    
    {
        error = {
            message = "An unknown error has occurred.";
            type = OAuthException;
        };
    }
    I have read that the News Feed should be retrieved using me/home. The session seems to be active as I have no problem getting the user's wall posts using me/feed.

    Does anyone know why I can't get the user's news feed? I have added the read_stream permission and when I log into my Facebook account I see that my application is registered as being able to read my news feed.

     

Share This Page