简体   繁体   English

iOS:我自己的帖子的Facebook SDK

[英]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.

相关问题 Facebook iOS SDK:在我的墙上张贴提及朋友 - Facebook iOS SDK: Post on my wall with mention friends 当我将图像发布到自己的墙上时,facebook返回com.facebook.sdk,错误= 5 - facebook return com.facebook.sdk, error = 5 when I post an image to my own wall 如何使用Facebook SDK共享对话框将帖子共享到Facebook组而不是我自己的时间轴? - How to share a post to a facebook group, not my own timeline, using the Facebook SDK share dialog? 使用Facebook SDK 3.0(测试版),Xcode 4.3.2在我自己的Facebook墙上张贴图像 - Post an image on my own Facebook wall with Facebook SDK 3.0 (beta), Xcode 4.3.2 无法使用facebook ios sdk发布到facebook - cannot post to facebook using facebook ios sdk 在Facebook页面上发布为管理员iOS Facebook SDK - Post on Facebook page as admin iOS Facebook SDK WebKitErrorDomain 同时在我的 ios 应用程序中集成 facebook ios sdk。 使用 Dialog Feed 在墙上发帖 - WebKitErrorDomain while integrating facebook ios sdk in my ios application. Using Dialog Feed to post on wall 如何在Facebook iOS SDK中发布或共享? - How to post or share in Facebook iOS SDK? iOS Facebook SDK 3.2.1 Feed发布错误 - iOS Facebook SDK 3.2.1 Feed post error 无法在iOS中使用Facebook SDK发布到朋友墙 - Not able to post to friends wall with facebook sdk in ios
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM