我想使用 ios 6.0 社交 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);
}];