[英]IOS: facebook sdk per my own post
I have a question about sdk facebook integration with my iOS app. 我对将sdk facebook集成到我的iOS应用程序有疑问。 In my app I want authenticate the users with the facebook login and it's all clear here 在我的应用中,我想使用Facebook登录名对用户进行身份验证,这在这里很清楚
http://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/ http://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/
In this app the users should post something in their facebook account, as a photo or a message, not complicated yet. 在此应用程序中,用户应在他们的Facebook帐户中发布一些照片或消息,但并不复杂。
The problem is... is it possible detect the number of comments and like that users receive for their posts? 问题是...是否有可能检测到评论的数量以及用户收到帖子的程度? Is there something in facebook sdk that allow to obtain this information? facebook sdk中是否有某些东西可以获取此信息?
thanks 谢谢
Use following code and you can get more idea from Facebook iOS SDK 3.0, implement like action on a url? 使用以下代码,您可以从Facebook iOS SDK 3.0中获取更多信息,对URL执行类似操作? also. 也。
NSString *urlToLikeFor = facebookLike.titleLabel.text;
NSString *theWholeUrl = [NSString stringWithFormat:@"https://graph.facebook.com/me/og.likes?object=%@&access_token=%@", urlToLikeFor, FBSession.activeSession.accessToken];
NSLog(@"TheWholeUrl: %@", theWholeUrl);
NSURL *facebookUrl = [NSURL URLWithString:theWholeUrl];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:facebookUrl];
[req setHTTPMethod:@"POST"];
NSURLResponse *response;
NSError *err;
NSData *responseData = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&err];
NSString *content = [NSString stringWithUTF8String:[responseData bytes]];
NSLog(@"responseData: %@", content);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.