【发布时间】:2014-04-08 04:42:09
【问题描述】:
我在我的应用程序中使用了FacebookSDK.framework 进行 Facebook 集成。我必须喜欢应用程序中的一个 Facebook 页面。我已经使用以下代码来喜欢页面。
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:@"https://www.facebook.com/demoappname"
, @"object",
nil
];
/* make the API call */
[FBRequestConnection startWithGraphPath:@"me/og.likes"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
)
{
NSDictionary *currentResult= [(NSArray *)[result data] objectAtIndex:0];
if(!error)
{
NSLog(@"there is no error");
}
else
{
NSLog(@"There is something wrong at here.");
}
}];
但我不清楚我必须在“object”参数中传递什么。任何人都可以帮助我在这里做错了什么。
谢谢,
【问题讨论】:
标签: ios facebook facebook-graph-api ios7 facebook-ios-sdk