Twitter OAuth with MGTwitterEngine

2019-04-15 12:45发布

I'm using the MGTwitterEngine to connect to twitter and I want to use OAuth with the MGTwitterEngine?

5条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-04-15 13:31

There's a modified version of MGTwitterEngine on GitHub that is supposed to use OAuth: http://github.com/kimptoc/MGTwitterEngine-1.0.8-OAuth/

查看更多
三岁会撩人
3楼-- · 2019-04-15 13:31

The master branch has merged OAuth and xAuth support back in.

查看更多
爷、活的狠高调
4楼-- · 2019-04-15 13:45

I suspect that if the MGTwitterEngine doesn't implement OAuth, it soon will, or will need support for it soon.

I'd suggest seeing if the current development version supports it, and if not -- and you have the motivation -- working on a patch for this functionality.

查看更多
放我归山
5楼-- · 2019-04-15 13:46

i would highly suggest using xAuth instead of OAuth as the process on the user's end doesn't at all change. i wrote a tutorial about how I got it to work on iPhone only if it helps. http://www.2bros1blog.com/2010/07/switching-from-basic-to-xauth-with-mgtwitterengine-on-iphone/

查看更多
Anthone
6楼-- · 2019-04-15 13:47

After having a look at STTwitter, FHSTwitterEngine and MGTwitterEngine I ended up using OAuthConsumer available through github.

My reasons for this were that I was writing an app for Mac OSX Lion in XCode with Objective-C. Most of the OAuth/Twitter code out there was either for other languages, iOS-specific or quite out of date and full of deprecated calls.

Apple's SDK 10.8 now has a social.framework (includes SLRequest) and and accounts.framework (includes ACAccount) which should be really useful for accessing FB, Twitter and some other social site I didn't recognise. Unfortunately that was no good for me working under 10.7 so I did not try those out practically. Would be interested to know anyone's experiences under 10.8.

OAuthConsumer was really straight forward to use to get through Twitter's API properly and is available in a few different languages. You do need to sort out your own JSON etc. but that's pretty straight-forward with NSJSONSerialization etc.

I've written up more detail on this on my blog Twitter OAuth Cocoa. If you need an OAuth, twitter-friendly bit of code, and the function-rich twitter engines aren't working for you then I'd recommend OAuthConsumer.

查看更多
登录 后发表回答