微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ios – 找不到Facebook.h.

我正试图通过我离开亚马逊的Facebook SDK书籍.编码开始于
#import“Facebook / Facebook.h”
你有几乎立即创建一个Facebook对象吗?我的SDK中似乎没有任何此文件.这本书已经过时了吗?它刚刚于去年秋天发布……

解决方法

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

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

#import <FacebookSDK/FacebookSDK.h>

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

更新

我找到了官方Facebook的答案.显然,这些是不推荐使用的标题,仍可用于向后兼容性.

请注意,在底部,如果在完成以下步骤后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 deselectcopy 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

原文地址:https://www.jb51.cc/iOS/331204.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐