开发者

Facebook Graph API can't like

I would like to be able to like a Facebook status using the Graph API. I have successfully written a status update and a comment to a status update so it all seems to be perfectly set up. Still, I get an error when trying to like a status update.

This is the error I get:

Error details: {
    error =     {
        message = "(#200) This API call requires a valid app_id.";
        type = OAuthException;
    };
}

This is my code:

NSString *postId = [data objectForKey:@"post_id"];
NSString *request = [NSString stringWithFormat:@"%@/likes", postId];
[facebook requestWithGraphPath:request andParams:nil 开发者_开发知识库andHttpMethod:@"POST" andDelegate:self];

Does anyone know what I am doing wrong?


You need to include the app_id in your request.


I had this problem today and the problem wasn't that my app_id was missing. I tried a bunch of different things without any luck then finally resolved the problem by revoking access for the iOS app in my general settings and then allowing them again.

I opened the app once in between this too, so I can't confirm whether flipping the switch on/off is enough.

I think the problem can arise when users upgrade their OS and username/password has to be reentered for FB/Twitter accounts. For whatever it messes with apps' individual access permissions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜