iphone MGTwitterEngine - post a tweet with my app signature

后端 未结 3 958
说谎
说谎 2021-01-03 05:52

I\'m using MGTwitterEngine in an iPhone app, and it works great. The one thing I want to change is the \"posted from MGTwitterEngine\" that appears on Twitter. Obviously I\'

3条回答
  •  隐瞒了意图╮
    2021-01-03 06:10

    I was able to get it to work using this demo by Ben Gottlieb:

    http://github.com/bengottlieb/Twitter-OAuth-iPhone

    Do a search for REPLACE ME and you will able to find where you need to input your consumer key & secret.

    The user has to grant your app permission via the Twitter website so it's a bit ugly when you run it the 1st time but it works. I don't know of any alternatives at present - hopefully Twitter will update the process soon. You only have to do the ugly OAuth authentication once. After that, this line:

    [_engine sendUpdate: [NSString stringWithFormat: @"Already Updated. %@", [NSDate date]]];
    

    will post an update to your twitter account that should be appended with "from MyCoolApp".

提交回复
热议问题