“喜欢"使用Facebook Graph API,Objective C的页面 [英] "Like" a Page using the Facebook Graph API, Objective C

查看:72
本文介绍了“喜欢"使用Facebook Graph API,Objective C的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图允许我的iOS应用程序的用户使用以下代码赞"页面:

I'm trying to allow the user of my iOS app to "Like" a page using the following code:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"access_token",[[NSUserDefaults standardUserDefaults] objectForKey:@"fb_accessToken"], nil];

[facebook requestWithGraphPath:@"PAGE_ID/likes" andParams:params andHttpMethod:@"POST" andDelegate:self];

我收到错误消息:

Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x624d560 {error=<CFBasicHash 0x6243fb0 [0x171e400]>{type = mutable dict, count = 2,
        entries =>
            2 : <CFString 0x624cec0 [0x171e400]>{contents = "type"} = <CFString 0x624bc40 [0x171e400]>{contents = "OAuthException"}
            3 : <CFString 0x624aaf0 [0x171e400]>{contents = "message"} = <CFString 0x6248b50 [0x171e400]>{contents = "(#3) Application does not have the capability to make this API call."}
        }
        }

这应该是Graph API的一部分,因为它表示您可以使用它来喜欢"具有/Likes连接的任何对象.有帮助吗?

This should be part of the Graph API because it says you can use that to "Like" any object with a /Likes connections. Any help?

推荐答案

很抱歉,您是坏消息的承担者,但显然您不能代表用户喜欢Page.但是,您可以代表用户喜欢帖子,评论和照片.

Sorry to be the bearer of bad news, but apparently You can't like a Page on behalf of a user. You can, however, like posts, comments, and photos on behalf of a user.

希望这是有道理的,我已经花了最后几个小时来尝试模拟.

Hope this makes sense, I've spent the last few hours trying to do simular.

丰富

这篇关于“喜欢"使用Facebook Graph API,Objective C的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆