gpt4 book ai didi

ios - 找不到 Facebook.h

转载 作者:可可西里 更新时间:2023-11-01 03:36:10 26 4
gpt4 key购买 nike

我正在尝试通过我从亚马逊获得的 Facebook SDK 书籍来工作。编码开始于#import "Facebook/Facebook.h"您是否几乎立即创建了一个 Facebook 对象。我的 SDK 中似乎没有这个文件。这本书已经过时了吗?它是去年秋天刚刚出版的...

最佳答案

以下是最新的,对我来说是一个很好的资源:Getting Started with the Facebook SDK

我使用以下导入来访问 Facebook SDK:

#import <FacebookSDK/FacebookSDK.h>

您的环境似乎没有 Facebook 框架。下载 here.

更新

我已经找到了官方 Facebook 答案。显然,这些已弃用的 header 仍可用于向后兼容。

请注意,在底部,如果 Xcode 在完成以下步骤后无法识别导入,请重新启动 XCode。

Add the headers by dragging the DeprecatedHeaders folder from the FacebookSDK.framework/Versions/A/DeprecatedHeaders folder into the Frameworks section of your Project Navigator.

Choose 'Create groups for any added folders' and deselect 'Copy items into destination group's folder (if needed)'. This adds the headers as a reference.

Now, open up your app delegate header file and replace the Facebook framework import with the Facebook header import.

Change:

#import <FacebookSDK/FacebookSDK.h> 

To:

 #import "Facebook.h" 

This allows you to make call to the FBDialog classes. The Facebook.h header includes the header files.

Note: If you have any problems with Xcode recognizing the Facebook.h file, just close and reopen your Xcode project.

Source

关于ios - 找不到 Facebook.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12807489/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com