开发者

Access news feed from Facebook using the iOS sdk

开发者 https://www.devze.com 2023-03-26 21:17 出处:网络
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.

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.

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:开发者_C百科@"me/home" andDelegate:self];

The error is:

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.

This app can: Access posts in my News Feed


This post on Facebooks Developer Forums indicates that this is a problem on Facebook's part.

0

精彩评论

暂无评论...
验证码 换一张
取 消