Facebook App Invite "FBSDKAppInviteContent" not recognized - ios

I am currently trying to implement Facebook's new "App Invites for iOS". I'm using Objective C and I have added the following frameworks:
Bolts.framework
FBSDKCoreKit.framework
FacebookSDK.framework
I have also imported <FBSDKCoreKit/FBSDKCoreKit.h> and <FacebookSDK/FacebookSDK.h>. It's like the code isn't recognized, why? I get the following errors:
What do I need to do so that I can use FBSDKAppInviteContent. Also, is there a special URL or PHP/JS equivalent?

I think you also need to import FBSDKShareKit/FBSDKShareKit.h
Don't forget to link FBSDKShareKit.framework to your library.

Related

How to integrate BRLMPrinterKit with iOS for a Flutter App?

I have been trying to integrate the Brother's SDK for printing with the iOS part of my Flutter project.
The following are the steps that I followed :
I added the BRLMPrinterKit.framework & BRLMPrinterKitW.framework to the Framework folder in my Xcode project.
Added $(PROJECT_DIR)/Frameworks to the Framework Search Paths and Header Search Paths.
I then added #import <BRLMPrinterKit/BRLMPrinterKit.h> to the Runner-Bridging-Header.h.
After performing the above steps, when I try to import BRLMPrinterKit in the appdelegate file, I am getting a "No such module BRLMPrinterKit" error.
Any Help will be appreciated.
You don't need to add "import BRLMPrinterKit" in your Swift file. So, just delete this line and you should be OK.
Adding #import <BRLMPrinterKit/BRLMPrinterKit.h> as you did to the Bridging Header is sufficient to be able to use SDK APIs in a Swift file.
A few other tips:
Do NOT include both frameworks in your project.
Use BRLMPrinterKitW.framework if you are ONLY supporting WIFI
Use BRLMPrinterKit.framework if you are supporting Bluetooth (and also WIFI)
You must "embed and sign" the framework via the General tab for the target. Otherwise your app will crash as soon as you run it.
You may need to add #import <BRLMPrinterKit/BRPtouchPrinterKit.h> to your Bridging Header too, if you need to access any APIs from the older v3 SDK (BRPtouchPrinterKit) that do not have equivalent APIs yet in the v4 SDK (BRLMPrinterKit).

Use of unresolved identifier PFFacebookUtils

I've done all is mentioned here (https://www.parse.com/docs/ios_guide#fbusers/iOS) for implement in iOS the Facebook Login.
The problem is that i have an compile error "Use of unresolved identifier PFFacebookUtils"
near che line
PFFacebookUtils.initializeFacebook()
in AppDelegate. I've correctly imported the Parse and Facebook Framework into my project.
Are there some bug knowed in Xcode 6 Beta?
Parse docs doesn't mention this yet: After downloading the Parse iOS SDK, You should include the ParseFacebookUtils.framework into your project, then import it in each file you want to use it, like you did for the Parse.framework itself:
#import <Parse/Parse.h>// This use to be enough to use Facebook utilities
#import <ParseFacebookUtils/PFFacebookUtils.h>// But now we should import this framework as well to use Facebook utilitis
Parse team has separated the Facebook related classes from Parse API, hence a ParseFacebookUtils.framework
You may need to
import ParseFacebookUtils
in your AppDelegate
If you want to use PFFacebookUtils or/and PFLogInViewController with swift, you have to do this:
For not V4 version:
#import <ParseFacebookUtils/PFFacebookUtils.h>in bridging header and then import ParseFacebookUtils in swift file. And call PFFacebookUtils.initializeFacebook() somewhere, of course best place for this is application didFinishLaunchingWithOptions.
For V4 version:
#import <ParseFacebookUtilsV4/PFFacebookUtils.h> in bridging header and import ParseFacebookUtilsV4 in swift file. And call PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions) in application didFinishLaunchingWithOptions.
Of course you should have set your bridging header correctly and import frameworks.
Resolved! #import in bridging header
After the update to Parse/FacebookUtils, to import you do #import <Parse/PFFacebookUtils.h>

"FBDialogs" not available in my app

I am trying to integrate Facebook sdk in my iOS app. I am using the Facebook reference docs and according to it, I am sharing using FBDialogs but the editor returns error "use of undeclared identifier FBDialogs". I have imported the Facebook sdk, other necessary frameworks, and other obvious things but still not getting it. Any help is appreciated.
Not only do you need to add the Framework to the project, but you need to also ensure that the compiler can see the header files.
Add this to the top of the file where you are getting the compiler error.
#import "FBDialogs.h"
You shouldn't have to explicitly import FBDialogs. But you absolutely do need to:
#import <FacebookSDK/FacebookSDK.h>
in the .h files of any and all of classes you've created to manage / access your FB connection.
You should check out the SDK version used and see in this change log if it is available to the version you are using.
Hope it helps!

Facebook SDK 3.1 - send app requests

Is it possible to send app requests using the Facebook SDK of iOS 3.1?
The documentation Facebook provides doesn't work with the new 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. This is not how they tell you to create a FB connection using 3.1
2) You cannot import Facebook.h with the new SDK
3) However, you can import Facebook.h with the new SDK if you import the deprecated headers into the app
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).
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.
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
http://www.cocoapods.org

Using FBNativeDialogs in an iOS 6 app

I'm implementing a feature where users can share photos on Facebook from an iOS app. The presentShareDialogModallyFrom method looks promising however I'm having trouble using it. Specifically I don't know what to #import if anything. Also I'm not sure if I need to add additional frameworks.
Integrating Twitter was pretty easy: just add the Twitter framework and import the relevant header file.
What do I need to import/add to my iOS 6 app in order to use FBNativeDialogs?
According to the Facebook SDK documentation, you should have Social.framework, Accounts.framework, and AdSupport.framework in your Linked Frameworks and Libraries. If you support any iOS below version 6.0, they should be Optional instead of Required.
In the class where you wish to use the presentShareDialogModallyFrom function, add #import <FacebookSDK/FacebookSDK.h>.

Resources