using OAuth authentication in iphone for twitter - iphone

Hey guys I am trying to implement the twitter for posting the comments about my music application.For that I use OAuth authentication twitter but it give me error
please help out I didn't know anything in this.
it show's me this error
"'TWITPIC_API_KEY' undeclared (first use in this function)"
if i need some key in this than where to find this key .How to implement this key .
Guys I realllly didn't know anything .please help me .
Thanks in advance .

You need to create and generate an API key with Twitter and Twitpic for your application. You can do that at: http://dev.twitter.com/apps (twitter) and http://dev.twitpic.com/apps/new (twitpic)
Once you've created your application on the twitter and twitpic sites, you'll be provided with the keys you need (referred to as consumer key and consumer secret on twitter iirc).
Then, and this is hard to help you with completely as you've not stated which ObjC api you're using or provided code, update or define TWITPIC_API_KEY with your API key.

Implementing oAuth or xAuth to post tweets to twitter may be quite tricky. But to help you out with your problem we need more information on the libraries you are using to implement OAuth.
Your "TWITPIC_API_KEY" error looks like you're using a library not quite suitable for your purpose: I assume you don't want to post your comments as pictures to Twitpic ;-) So, if you want to connect your music app with twitter to post tweets there should be no need for a TWITPIC_API_KEY. You would only need a Twitter-API-Key as dannywartnaby suggested.
Here's a list of OAuth / XAuth / Twitter libraries which you may use for implementing the feature in your application: http://dev.twitter.com/pages/oauth_libraries#objectivec
MGTwitterEngine is quite popular ... but the choice depends on your functionality & licensing needs.

Related

IOS linkedin integration (Send Connection Request, Search People)

I'm using the linkedin OAuth sdk.
I have the oauth functionality working and my iPhone App is able to successfully logged in to LinkedIn.
i want to implement these two things.
I want to search people using the JSON protocol.
I want to send connection request people which i got from search.
Please provide me assistance asap. suggest me Sample codes if any.
thanks in advance.
I couldn't offer you specific answer for your question, but you should check on this open-source project.
LinkedIn Share for iOS

Photobucket IOS integration

could anyone assist in authenticating to photobucket and uploading an image from and iPhone app? I am currently configured with many networks but I can't really find good documentation for the photobucket process. I guess the process is only authenticate and upload using customer key then username and password of the user?
Any help here would be amazing! Thanks in advance!
Jim
Jim, the Photobucket (PB) process for authenticating is modified OAUTH. If you start looking at OAUTH examples you will find that you can authenticate on PB by simply converting a sample over to PB. e.g.: There's an OAuth starter kit set up for LinkedIN by Lee WHitney on Github courtesy of Kirsten Jones. Register an app with PB, get your keys and plug in the keys & correct PB URLs and you will be working. The URLS you need are:-
requestTokenURLString = #"http://api.photobucket.com/login/request";
accessTokenURLString = #"http://api.photobucket.com/login/access";
userLoginURLString = #"http://photobucket.com/apilogin/login";
This will get you logged in but there's a lot more to come. PB have a code page and there is an Objective-C library including a modified OAUTH but it's missing docs so you need to work it out by studying the code. Bitbucket Photobucket code for objective-c
The issue I have is to do with their usage of sub domains and trying to get OAUTH to work with that.
UPDATE: Solved: I have at last worked out how to get a part of the provided API working in my own Xcode project. Basically I added the special Oauth files which enable the requests to be set up correctly to get round the subdomain stuff.
eg: OAuthASIHTTPRequest etc
I'm now getting full album info.
Official documentation for Photobucket API is available at: http://pic.pbsrc.com/dev_help/WebHelpPublic/PhotobucketPublicHelp.htm . You can find examples for login and media uploading.
Client libraries for Photobucket API are at: https://bitbucket.org/photobucket/api/wiki/Client_Libraries . There is a Objective-C one, like SundialSoft mentioned in answer.

Post Twitter message from iPhone app with OAuth

How can I post a message on Twitter from my app using OAuth authentication?
I'd like to post an invariable message with a variable link...
How can I do this?
Any source? Any tutorials?
Thanks a lot!
Use an OAuth library such as:
http://github.com/jdg/oauthconsumer
http://github.com/bengottlieb/Twitter-OAuth-iPhone
There are various tutorials out there like:
http://www.jaanuskase.com/en/2010/01/an_example_iphone_twitter_app.html
It can be tricky, especially since twitter has changed since some of the popular iPhone implementations were written, but this will give you a place to start.

how to login in twitter using oath

I am building a twitter application that is currently using the classic login instead of OAuth. I don't know how to use Oauth to implement login.Please anybody help me to provide some help regarding how to login through OAuth login
If you want to be done with it as fast as possible, use Ben Gottlieb's Twitter-OAuth-iPhone library. If you want to know exactly what happens, plan a few days to read all you can about OAuth, and then several weeks to implement.

Using oauth for creating twitter application in iphone

I am creating a twitter application in iphone using oauth. But my application request for:
oauth_consumer_key,
oauth_signature_method,
oauth_signature,
oauth_timestamp,
oauth_nonce,
oauth_version,
oauth_callback,
Please anyone help me how to create all these keys for my application.
In my twitter account xauth is disabled by default. So, how can I enable it in my application?
It's highly unlikely you need to enable xAuth. The Twitter API documentation, specifically the authentication guide explain these parameters in more detail. Also have the OAuth 1.0 spec open to refer to, even if you're using a third party library- you will save your sanity if you understand the mechanics of the token exchange.
You'll need to read up about OAuth. All the fields are part of the standard. Twitter will give you the first one (oauth_consumer_key), and the version number is always 1.0. (Version 2.0 is not yet complete and Twitter doesn't use it.) The others you need to calculate. Or at least find an open source library that does it for you.
As for enabling xAuth, you need to send a message to Twitter. Sounds like they're getting more and more strict about which apps they allow, though.