问题描述
当我尝试将SBJson图书馆与facebook-ios-sdk一起时,我得到
At the moment when I try to have the SBJson library alongside the facebook-ios-sdk I get
'类的重复接口定义'SBJsonParser''
出来。
所以我创建了一个静态的facebook-ios-sdk库,然后我也在同一个项目中获得了我的标准SBJson库。我收到错误。
So I have created a static facebook-ios-sdk library and then I have also got my standard SBJson library in the same project. I get the error.
任何人都可以提出解决这个问题的方法吗?我真的需要在我的应用程序中使用该库...因为我已经在这个库中有几千行代码,需要实现Facebook ...
Can anyone suggest a way to fix this? I really need to use that library in my application... as I already have a good few thousand lines of code in this library and need to implement facebook too...
推荐答案
facebook SDK已经包含SBJSON库。这就是为什么你得到一个重复的定义错误。尝试删除您的SBJSON文件,然后删除您的SBJSON文件,然后删除您的facebook SDK中的 #importSBJSON.h
。
The facebook SDK already contains the SBJSON library. That is why you are getting a duplicate definition error. Try removing your SBJSON files and then #import "SBJSON.h"
, it should get the file from your facebook SDK.
尝试: initWithData:encoding:
NSString方法。
Try: initWithData:encoding:
NSString method.
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSDictionary *dict = [responseString JSONValue];
这篇关于使用SBJson与Facebook sdk静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!