Facebook SDK 3.1 - send app requests - ios

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

Related

Original AWSCognito framework not in newest AWS ios SDK

I inherited an iOS app that has AWSCognito as a dependency.
I'm receiving an error for #import <AWSCognito/AWSCognito.h> in a file.
Looks like this lib is needed to do the following
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc]
So looks like I just need some header to allow me to do that authentication. I tried grepping the sdk folder but haven't found that class in a header yet (references to it are everywhere and it's hard to find)
I downloaded the latest AWS ios SDK at Latest iOS SDK
I added a couple AWS frameworks by just dragging the .xcframework folders to frameworks, libraries, etc
Only thing is the AWSCognito framework is missing.
There's only AWSCognitoAuth, AWSCognitoIdentityProvider, and AWSCognitoIdentityProviderASF. Dragging all 3 of these over did not fix the error.
I downloaded an older version of the SDK that did have the AWSCognito folder (however, it was .framework and not .xcframework)...Regardless, I still got the same error.
Has the original AWSCognito framework been deprecated to a mixture of AWSCognitoAuth, AWSCognitoIdentityProvider, and AWSCognitoIdentityProviderASF ?
Do I just need to rename the import of the header file? Is there a version of the SDK that includes the original AWSCognito.framework as .xcframework.
Thanks!
I used #import <AWSCognitoAuth/AWSCognitoAuth.h> and that at least made the build pass.
I'm guessing this is just the newer lib to use and the regular AWSCognito is deprecated. Can anyone confirm?

Facebook App Invite "FBSDKAppInviteContent" not recognized

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.

Do I need my AppDelegate.swift to be in Objective C for PayPal SDK

I'm creating an iOS application in swift. The SDK for PayPal, appears to only be Objective-C, can I use the SDK in Swift or do I need to change my AppDelegate Files into the old .h and .m files?
Cheers,
Emerson
You can import PayPal's SDK files into the bridging header to enable usage in swift files.
For anyone who had gone through the process as I did, It was much easier to start a new Obj-c project.
I created the new project and imported all my files, with a few minutes set up I was able to incorporate PayPal and Parse SDKs, fully functioning.
Thank you everyone for your answers.

"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!

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