1

Have an app that is built in xcode and using Objective C, I'm currently using the MGTwitterEngine + OAuthConsumer framework to send out tweets. Worked great until yesterday when they finally moved to API1.1 and enforced oauth_callback in the OAuth requests.

I can pretty much get around the JSON issue in MGTwitterEngine since it's all source. I reworked it so it sends the JSON request instead of XML for what I need. The problem is that there is no option for oauth_callback in the OAUTHConsumer framework. It didn't exist years ago.

I just get Error Domain=HTTP Code=401 "The operation couldn’t be completed. (HTTP error 401.)

Anyone building OSX apps (or even iOS) seem to have a fix for this?

Thanks for some pointers.. seems everything for Xcode is about 3 years old. There were some quick fixes for the API change a while back and I did migrate to those but still nothing for OAUTH.

4 Answers4

1

Check out the STTwitter Objective-C library.

It works on OS X and iOS.

It supports Twitter API v.1.1 including the new "App Only" mode.

nst
  • 3,862
  • 1
  • 31
  • 40
0

It sounds like OAuthConsumer is out of date. I have used Sharekit for these tasks and find it to be easy to implement and trouble free. http://getsharekit.com

sean808080
  • 242
  • 4
  • 13
  • Sharekit looks awesome, sadly it's for iOS and not an OS X app. Still looking for a solution, seems that my whole Authentication process works but not when sending the updates or any other requests to the server. – Bryan McDade Jun 13 '13 at 13:13
  • Bryan, Twitter mentioned now "applications to authenticate all of their requests with OAuth", As far as I know MGTwitterEngine only authentication request used OAuth. Check out this TwitterEngine Code may be its help you. https://github.com/fhsjaagshs/FHSTwitterEngine – mandeep-dhiman Jun 14 '13 at 09:19
  • Thanks I found that one too. None quite work how I want, and I have MGTwitterEngine really buried in with some other OAuth/Twitter code. Some additional changes along with the JSON throwing a whole wack of errors and it's sort of working again. – Bryan McDade Jun 21 '13 at 23:13
0

From Twitter v1.1 you need to send authentication parameters for all request.. they are updating there api ..you can use this library Click FHSTwitterEngine its working for me as i faced same problem

the1pawan
  • 1,194
  • 9
  • 26
0

This is worked for me : You have to implement your code as it is like in twitter api 1.0. In new api 1.1, you have to add two jar file twitpic4j.jar and most important twitter4j-core-3.0.3.jar. then it's work fine. Enjoy and vote up.

Download jar file from here : http://code.google.com/p/comp3111-project-team201/downloads/detail?name=twitter4j-core-3.0.3.jar&can=2&q=

Mitul Goti
  • 2,657
  • 1
  • 22
  • 19
  • I have added jar files and also updated API domain to "api.twitter.com/1.1" still getting same error Code=401.Any help. – Madhuri Mar 03 '14 at 10:14