I would like to integrate the "Foursquare check in" feature into my iOS application. I am able to fetch the Foursquare access token using UIWebView. But i am struggling to implement check in feature. I did searched lot in Google to implement check in feature using access token. I found the following tutorial Foursquare but this one didn't helped me to integrate in xcode
Please help me, in case you know how to implement check in feature in Foursqure. It would be really helpful
Thanks in anticipation!
Once you have an access token, the hard part is done! You can use the access token in either a call in a client library or you can make a direct HTTP POST request to our checkins/add endpoint. The URI should look like, before adding any other optional parameters:
https://api.foursquare.com/v2/checkins/add?oauth_token=ACCESS_TOKEN&venueId=VENUE_ID&v=20130822
Note that Foursquare also released native auth for iOS, which can make getting the access token even easier without having to use a UIWebView.
try this one:
Git Hub Demo Code
Related
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.
I have started to integrate Facebook SDK into my iPhone project. I have no problem on devices with multitasking using SSO. The received access token is long lived and I can extend it by calling the "extendAccessToken" method from Facebook iPhone SDK.
It seems that the access token extension doesn't works on devices without multitasking support. It's very strange, that the "extendAccessToken" method uses an old REST API to extend the token: "auth.extendSSOAccessToken", but the API returns with an error message that says:
"The access token was not obtained using single sign-on". (iPhone 3G)
I have also tried to use the "oath/accesstoken" graph api described on this page: http://developers.facebook.com/docs/offline-access-deprecation but it seems that the returned access token has the same expiration date like before calling this api (I tried to extend the token after 5-6 days since I received it).
Has anybody the same issue?
Maybe this is not a bug but it's a Facebook feature. Maybe the Facebook allows to extend the access token only if it is received through a trusted environment using single sign-on (like Facebook Application or Safari browser).
We had the same issue.
The way we are currently solving it is by having a server extend the access_token.
If anyone has a better solution, would love to hear. If there isn't a better solution and you would like to use our server to extend access tokens, we can work something out.
Yoav.
I need to do this for the Soundcloud API and I have no idea what this is about or how to do it. There is a form on the Soundcloud API Developer website where you save your callback URL, but I'm not sure what sort of information I should input there.
Any help?
i believe this callback url is for oauth authentication, correct? i needed to do the same thing for twitter and ended up setting up a custom url scheme for my app (ie appname://oauth) and using this as the callback url.
in case you want to try this, see this article on how to launch your app via a custom url scheme. specifically for twitter, you can see jaanus's post on some implementation details and the github project.
while i haven't integrated with soundcloud, i did find that they have an objective-c api that you may want to check out if you aren't already here.
update
so what i mentioned is true - that you can use a custom url scheme and such to handle the authentication, but it's not exactly required. i found this article which outlines two methods for authentication - the first is for ios4 only and requires very little code. the second should work on 3.x and uses the custom url method i mentioned above (and outlines how to use it to authenticate).
so to answer your question once and for all, i suggest you:
look at this readme for the objective-c soundcloud api.
read this setup guide.
then read this usage guide.
check out this test iphone application.
hope this helps!
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.
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.