在 Facebook 墙上发布字符串而不显示对话框(iPhone Facebook SDK)
我一直在搜索 stackoverflow 和互联网,但没有找到符合我意图的可行解决方案。
我想调用一个以字符串作为参数的方法,然后将其发布到 Facebook 墙上而不显示对话框。当然,只有当有效会话可用时。
我尝试过:
// post message to facebook pinnwall
- (void)postOnWall:(NSString *)message {
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: message, @"message",nil];
[[FBRequest request] call:@"facebook.stream.publish" params:params];
}
你们能帮我一个工作方法吗?
谢谢和欢呼, 杜诺特
I have been searching stackoverflow and the internet and did no find a working solution for my intention.
I want to call a method with a string as parameter which is then posted to the facebook wall without showing a dialog. Of course only when a valid session is available.
I tried this:
// post message to facebook pinnwall
- (void)postOnWall:(NSString *)message {
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: message, @"message",nil];
[[FBRequest request] call:@"facebook.stream.publish" params:params];
}
Can you guys help me ou with a working method?
Thanks and cheers,
doonot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
正如 Aby 所说,您必须充分发挥 FB 用户的 Graph API 潜力。
简单代码:
as Aby said, you have to look at the Graph API to user FB at its full potential.
simple code:
您是否尝试过使用 Graph API..
如果您希望应用程序在墙上打印而不需要像对话框这样的用户交互,您可以使用图形 API。
http://developers.facebook.com/docs/reference/api/post/
Have you tried using Graph API..
If you like your application to print on the wall without the user interaction like Dialog box you can use the Graph API..
http://developers.facebook.com/docs/reference/api/post/
发布到 Facebook Wall 你应该通过 JSON
检查这个代表
更好你可以通过这种方式跟进。 http://www.raywenderlich.com /77/how-to-post-on-facebook-with-your-iphone-app
精彩教程
Posted to Facebook Wall u should go through JSON
check out this delgates
better u can follow up this way. http://www.raywenderlich.com/77/how-to-post-on-facebook-with-your-iphone-app
superb tutorial
注意:必须需要“publish_actions”权限,并处理和检查 accessToken &用户是否已登录。
NOTE : must need "publish_actions" permission and also handle and check accessToken & user is logged in or not.