就像使用ios 6.0 social api的facebook页面一样

时间:2013-07-04 17:53:29

标签: ios facebook-graph-api

我想使用ios 6.0 social api实现类似页面功能。我想如果我获得了类似功能的确切的Facebook Graph API链接,那么它是可能的。但我没有得到什么是确切的网址。许多人说这是不可能的。我想知道确切的答案。

请检查以下代码和Facebook的回复。

{
    "error": {
        "message":"(#100) Like actions are not yet supported against objects of this type.",
        "type":"OAuthException",
        "code":100
    }
}

代码:

 NSURL *meurl = [NSURL URLWithString:@"https://graph.facebook.com/me/og.likes?"];
 NSDictionary *param = [NSDictionary dictionaryWithObjectsAndKeys:account.credential.oauthToken,@"access_token",@"https://www.facebook.com/sample",@"object", nil]; 
SLRequest *merequest = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodPOST URL:meurl parameters:param];
merequest.account = account;
[merequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
    NSString *response = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    NSLog(@"%@",response);
}];

0 个答案:

没有答案