简体   繁体   English

Facebook SDK 3.1-发送应用程序请求

[英]Facebook SDK 3.1 - send app requests

Is it possible to send app requests using the Facebook SDK of iOS 3.1? 是否可以使用iOS 3.1的Facebook SDK发送应用请求?

The documentation Facebook provides doesn't work with the new SDK: http://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/ Facebook提供的文档不适用于新的SDK: http : //developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/

Here are the issues: 这里是问题:

1) the documentation tells you to import Facebook.h and create an Facebook instance. 1)文档告诉您导入Facebook.h并创建一个Facebook实例。 This is not how they tell you to create a FB connection using 3.1 这不是他们告诉您如何使用3.1创建FB连接的方式

2) You cannot import Facebook.h with the new SDK 2)您不能使用新的SDK导入Facebook.h

3) However, you can import Facebook.h with the new SDK if you import the deprecated headers into the app 3)但是,如果您将不赞成使用的标头导入到应用中,则可以使用新的SDK导入Facebook.h

4) Once you import the deprecated headers into the app and follow the instructions on the above link, you discover dozens of fatal errors (redefinitions/duplicate declarations). 4)将不赞成使用的标头导入应用程序并按照上述链接上的说明进行操作后,您会发现许多致命错误(重新定义/重复声明)。

I've been looking around for quite some time and cannot find any solution for this. 我已经环顾了很长时间,找不到任何解决方案。 At least I have found others struggling with the same issue. 至少我发现其他人也在同一个问题上挣扎。

I fixed all the errors by not having #import "Facebook.h" and #import <FacebookSDK/FacebookSDK.h> in the same file. 我通过在同一文件中没有#import "Facebook.h"#import <FacebookSDK/FacebookSDK.h>来解决所有错误。

Anyway this way of supporting good features like app-requests sucks! 无论如何,这种支持诸如应用程序请求之类的良好功能的方式很烂!

I use CocoaPods.org and let it do all the hard work for me :D 我使用CocoaPods.org并让它为我完成所有辛苦的工作:D

http://www.cocoapods.org http://www.cocoapods.org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM