开发者

Tweeting from iPhone App

开发者 https://www.devze.com 2023-04-01 01:33 出处:网络
I was wondering if anyone had any success with creating an application and being able to post to Twitter from within the application. I have been looking at dev.twitter.com and am a bit confused about

I was wondering if anyone had any success with creating an application and being able to post to Twitter from within the application. I have been looking at dev.twitter.com and am a bit confused about OAuth and how I would get this to work in my app.

I am currently trying to create an application on twitter's website, but it is asking me about a callback URL. I thought you simply could put in AppName:// and this would be okay. I know you then have to add some stuff to the plist. I just am not finding the right documentation for this.

I want t开发者_如何学Goo simply post using HTTP POST methods, but I need the authorization part.

Can someone send me in the right direction or send me a link to an example of this. Thanks for your help, I really appreciate it!


Apple has also publicly announced Twitter support in iOS 5. However, I can't go into any of the specific about that (since iOS5 is still under NDA). If you have an Apple Development account - check this out:

  • https://web.archive.org/web/20140824013302/http://developer.apple.com/library/ios/documentation/Twitter/Reference/TwitterFrameworkReference/_index.html
  • https://developer.apple.com/library/content/releasenotes/General/WhatsNewIniOS/Articles/iOS5.html#//apple_ref/doc/uid/TP30915195-SW14


You will need to implement a custom URL scheme for your app before the AppName:// link will work. Documentation for this is here.

The alternative is to use a framework such as ShareKit to do a lot of the leg work for you.


Callback URL is important only for web application. It has not meaning for iOS apps according to twitter docs.

A drop in solution is using ShareKit It supports twitter plus some other social networks.


If you only wish to make outbound tweets you can use the API which is being introduced with iOS 5 to send them. You can find it in the Xcode 4.2/iOS 5 beta.

https://web.archive.org/web/20110806023302/http://www.apple.com:80/ios/ios5/features.html

This does have the disadvantage of being only available to devices running iOS 5 and probably will not be out for a month or two. But this may fit with your schedule.

0

精彩评论

暂无评论...
验证码 换一张
取 消