iOS Facebook API/SDK Wrapper? - ios

I've been looking for a good iOS Facebook API/SDK Wrapper, can't find any.
I need to be able to (with a few lines of code, not the insanely needed by Facebook's API):
Login user
Logout user
Get user's likes
Invite Friend to app
Maybe post to user's wall (this has been causing problems to other apps so not sure will actually implement)
Get user's friends
Get user's basic info (e-mail, name, etc.)
Is there any wrapper simplifying the absurd vanilla API?

https://developers.facebook.com/docs/reference/apis/
This should help and it is Facebook's official api.
Here's the documentation: https://developers.facebook.com/docs/ios/

You might be able to use portions of ShareKit for this (be sure to abide by their license): https://github.com/ShareKit/ShareKit/tree/master/Classes/ShareKit/Sharers/Services/Facebook
This doesn't do everything you asked, but it's a (clean) starting point at least: https://github.com/mobitar/Zuckerkit
This does a bit more, but hasn't been updated in a year: https://github.com/sinnerschrader-mobile/S2M-Facebook-iOS

I found this lib: https://github.com/lucascorrea/SCFacebook
It seems to use a not that outdated version of the iOS SDK (3.18 vs. current 3.21), is available on cocoapods and seems to cover many of your required API features.
I haven't used the lib my self, but i am considering it next time i have to develop an iOS App which needs to connect to facebook.

Related

How to work with Firebase App Indexing for IOS Apps

i am in the process of making my app with firebase i am pretty much done with that except Firebase App Indexing. I am very exited with this feature because it could help me to increase my app get more traffic from the web but the problem is i really can't able to see how to implement this. According to Firebase Docs i just need to register my app with this pice of code
[[FIRAppIndexing sharedInstance] registerApp:your Apple ID from iTunes Connect];
I have done that but what should i do after that?
1.My app is firebase app that means i don't have any website to host my content except firebase realtime database. Does my content is available for crawlers? if not how can i make available to them?
2.If i can able to show my content in the google search results i don't wanna show all the content and i wanna show just some of my content for example i have a social app for sharing General Knowledge questions, i wanna show just the question like "What is the highest mountain" in the search results and if the user want to see the answer it should take them to my app how can i do that?
3.As per docs i came to know that i need to create univiersal links for my app content to direct users from google search but how shold i do that ? Lets say should i crate universal links when the user create question?? if so how can i do that ??
Thank you very much for the help.
This is not currently possible on iOS using Firebase App Indexing. The situation is slightly different on Android, but that is not applicable to your question.
On iOS, Firebase App Indexing is simply highlighting pages on your website in Google search results that have corresponding content inside your app. This is achieved by piggybacking on Apple's Universal Links standard, and there is no proactive 'crawling' going on inside your app. This means unless you have a corresponding web page for your app with 1:1 content parity, you can't really benefit from Firebase App Indexing on iOS as it comes out-of-the-box.
The best workaround is to generate little 'placeholder pages' for every piece of content in your app, which the sole purpose of opening your app (if it is installed) or redirecting to the App Store (if it is not installed). Ideally you'll need some sort of deferred deep linking system so that users still see the correct content after downloading. Fun fact: this is essentially how HotelTonight operates their entire business model. Unfortunately Firebase's implementation is not mature enough to support this full flow, and Google hasn't quite figured out how to rank app-only content properly yet in search results so you will probably need to pro-actively submit your placeholder pages to them.
Shameless plug: at Branch, we provide all of the above as a free service. You can read more about it here and take a look at the set up docs here.

Facebook SDK Without Login - App Install Tracking Only

I just want the Facebook SDK for conversion tracking. I need the SDK to verify downloads when running Facebook "App Install" campaigns. However, I do not want my users to have to Login to Facebook when they open my app!
Can I just install part of the SDK, skip the login steps, and still get the conversion tracking? Maybe even event tracking?
I've watched several tutorials on how to install the SDK BUT they all include steps for login functionality:
https://www.youtube.com/watch?v=8T19jBUadaM
https://www.youtube.com/watch?v=ye3RtZ65npU
Thanks for the help.
The answer to my question was "yes'. In other words, I was able to get the conversion tracking function without adopting the login feature. Here's the guide.
In another question I outlined the steps to do it. Same steps as the guide but explained in different words / images.
Here is the link that explains caching that you can use for the purpose...
https://developers.facebook.com/docs/facebook-login/ios/token-cache

facebook sdk for iOS no longer functional

so as of about the end of april, my app no longer can post to Facebook. It appears that they have deprecated the original "facebooksdk.framework" for the "fbsdk" framework.
I have tried searching across various sites, and cannot find a good example of modifying my code to the new Facebook sdk. I am getting stuck on allowing 'publish_actions'. I get an error stating that i do not have them?
In the new version, is it mandatory that my app go through review before getting publish actions, and is it true that it was not mandatory under the older SDK?
I can post code related to this if needed, but right now I just have these general questions.
Thanks,
Jerry
thank you Librarian coder for the link.
I found it as i was continuing my search, and it turns out you DO NEED to submit the app for facebook approval in order to post statuses and pictures (after conforming to the new SDK).

Initiate Facebook Group Chat from iOS App

I want my app to create a new Facebook group chat with certain people that opens either on Facebook's site in Safari or in the native Facebook app when the user presses a button. I want Facebook to handle the whole chat and my app only to initiate it somehow in the cleanest and least involved way possible. My app already uses the Facebook SDK to open an active FBSession, so I've already got login credentials.
Looking around online and in Facebook's docs, I can't find anything that suits my needs. The closest thing I found was in this answer containing a list of Facebook app URLs you can connect to that open the Facebook app to certain pages. There's "fb://chat/(initWithUID:)" and "fb://messaging/compose/(initWithUID:)". However, not only is there no explanation on how to use these, but people say that Facebook has changed these URLs (and does not have any documentation on them), so they don't work anymore unless I reverse-engineer new URLs (which could change again). Ugh, so close!
I also found examples on starting chats with the Facebook Chat API, but that involves logging into Facebook using some networking framework then writing my own GUI and model for sending messages, which I am only prepared to do as a last resort. There should be some way to let the Facebook app or website do all that. Does anyone know how I can do this?
I've found something very close, but I still don't see a way to make my app initialize it with the desired group of friends:
The Facebook SDK has a message dialog that can appear for sending messages to friends. This isn't exactly what I wanted but is good enough because it means that all the programming is already done for me by Facebook, and users should be able to see these messages on https://facebook.com and the Facebook apps. https://developers.facebook.com/docs/ios/share#message-dialog

Accessing Google Calendar API with OAuth2 on iPhone

I'm trying to build google calendar functionality for an iPhone app. I understand I need to be authorized with OAuth2 and would like help some help. The iPhone app is accessing a public calendar and therefore the user is not supposed to login with a webview like the google toolbox framework. FWIW, I have my account set up. Any framework recommendation or good tutorials for this would be greatly appreciated.
I am in the same boat as you. The info you find on this is scarce and confusing... unfortunately.
You've probably already been to Google's API Documentation. This post helped me to get the GDataObjC-Client to work in my project.
Google's samples are unfortunately all for Mac and not iOS. Their take on it is, that the methods are pretty much the same for iOS as they are for Mac, so you figure it out how you translate the Mac portion to iOS.
I ended up doing just that... I created a new XCode project and brought over the code of CalendarSampleWindowController of the Mac-app to my ViewController.
Good luck!

Resources