Post to facebook newsfeed iOS - objective-c

Googling around didn't do well for me.
I would like to know how to implement Facebook post to newsfeed using ARC, iOS 5 and Storyboarding without leaving/exiting the app.
Already tried the tutorial in developer.facebook.com and had a hard time getting this done.
Any references will do.
Thank you so much!

Using the Facebook SDK is not a trivial task. You need to put in the hours to understand it or just use sharekit. In future iOS may incorporate Facebook as it did with Twitter but for now you have to go to GITHUB and download the Facebook iOS code & hackbook sample.
The web page at Facebook's developer pages for iOS is the place to start learning.
If you have enough hours to burn you can get an implementation going in a couple of days.
Regarding ARC you need to set the -fno-objc-arc compiler flags in build phases, compile sources for the Facebook .m files which are not ARC. Your own files can be written as ARC & mixed with the FB ones which are pre-ARC.

This Facebook iOS tutorial basically provides all the knowledge you need for making posts with the Facebook SDK. If you scroll down a bit, you'll see the code for posting to the newsfeed (hint: search for feedDialog).

Related

Appcelerator Titanium and Apple Pay

I am trying to use Apple Pay in a Titanium app. So far I've gotten it to work about a third of the time I run the app, the rest of the time the app crashes. My suspicion is that not adding the apple pay entitlement to the app is causing the crash (unfortunately there is no error message in the console when the app crashes).
Has anyone had any luck getting Apple Pay to work in a Titanium app?
Well, without advertising my Ti.ApplePay module, this might be the easiest way to adopt Apple Pay with Titanium. It supports all major Titanium versions and includes all native API's that are available. Give it a try or use a custom one :-)
I got it working. Here is a gist of the code in my module: https://gist.github.com/zach-babb-moovel/bd4172454cf54a178855e76ca5dd1f48. The key was wrapping the PKPaymentRequest and subsequent PKPaymentAuthorizationViewController parts in a dispatch_async call. You'll also have to make sure all your profiles are set up correctly and that you use a custom Entitlements.plist file for your Titanium project. Check out the Entitlements.plist here: https://github.com/hansemannn/applepaydemo/blob/master/Entitlements.plist for what it should look like.

Apple Watch on react-native

I want to get react-native working for the Apple Watch, but I'm not sure where to start
I started reading the code for the iOS implementation to figure out how they did it there.
My question is: are there any resources or guidelines for help to actually implement react-native (do they ever talk about this aspect of it) or do I need to just read through the code and figure it out on my own?
It would be nice if the react-native team made a document on how they got it up and running on iOS (or Android), though they may already have that out there which is what I'm looking for.
Thanks in advance for any advice and/or help
I was looking into this, too. I will share my findings.
According to this comment from the React Native team back in 2015, the team doesn't have resources to support it, yet.
Right now, we're focused on normal iOS and Android. We still a very small team and don't have the resources to target a different support right now. However, we open sourced React Native in the hope that we get help from the community to build those :)
Someone tried to build one with a lot of reverse engineering, but there are still unsolved issues causing crashes.

Objective-C playground?

Is there any sort of Mac app, Web app, or others like JSFiddle for Objective-C/Cocoa purposes?
It's not entirely the same, but look into F-Script: http://www.fscript.org/
It lets you rapid-prototype and experiment. You can also hook it into existing apps very easily. It has been invaluable for me for certain types of UI debugging.
I've also found CodeRunner to be quite handy for boilerplate app generation and one-click console running to try language snippets out. Available on the AppStore at a price.
I created playgrounds for Objective-C on top of code injection, so you can experiment with normal iOS simulator, it's open source on GitHub
Video showing them in action

Share via facebook - Xcode 4.2 with ARC

I'm trying to share a simple NSString via Facebook in my app. I am using Xcode 4.2 with ARC. Now, first i went to shareKit, but soon discovered that this won't work without using a lot of compiler flags and workarounds.
So now i'm looking for an easy-to-use Facebook sharing way? all i need to do is share a string via Facebook. So, the easiest way to get this done, while using ARC?
Thanks on advance guys.
ShareKit still is one of the best ways to do this, just simply have all the files in your project that don't use ARC have the -fno-objc-arc flag, like in the following image:

Twitter SDK for objective-c [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicates:
Twitter SDK on iOS with standard UI
Send a tweet from iPhone app
Is there an iPhone SDK API for twitter?
Is there a twitter SDK available for iOS? I checked their website but i can't find anything. I know that iOS 5 will have integrated twitter support, but what about ios4?
Thanks
See http://dev.twitter.com/pages/libraries#objectivec for some Objective-C client libraries. I haven't actually used any of these myself, but from what I hear the first option (MGTwitterEngine) does the job nicely.
Alternatively, you can find a tutorial for DIY from scratch here (although, it is a bit dated, no OAuth for example).
In iOS4, you can use NSURLConnection instances to talk to the Twitter API, and decode the returned JSON or XML. There are definitely good JSON decoder classes online for Objective-C, but many of the (pre-built) 'Twitter' classes, which wrap the API callbacks in a nice class, available online are now outdated as they are not maintained. If I were to recommend one, it would be the MGTwitterEngine, as this is maintained by Matt Gemmell, a prolific and reliable iOS developer - who obviously cares for the platform. He works on Twitterrific, which uses the MGTwitterEngine class, for instance; the likelihood of it being maintained is quite high.