iphone MGTwitterEngine - post a tweet with my app signature

后端 未结 3 959
说谎
说谎 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:08

    You can find detailed information on how to do this in the Readme: http://svn.cocoasourcecode.com/MGTwitterEngine/README.txt

    You mentioned that you already received your token, so the next step would be to call the method

    - (void)setClientName:(NSString *)name version:(NSString *)version URL:(NSString *)url token:(NSString *)token;
    

    on your MGTwitterEngine instance.

    0 讨论(0)
  • 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".

    0 讨论(0)
  • 2021-01-03 06:12

    From Twitters new FAQ for applications

    If you would like tweets from your application to recieve a source parameter, please register an application and implement OAuth authentication. We will automatically include your application as the source for any tweets sent from your application.

    We originally allowed applications to create a source paramter for non-OAuth use but that has been discontinued. Applications pre-OAuth source parameters will remain active, but new registrations are no longer accepted.

    So it looks as if you're gonna have to be doing some work!

    0 讨论(0)
提交回复
热议问题