Coder Social home page Coder Social logo

natashatherobot / foursquare-api-v2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from constantine-fry/foursquare-api-v2

0.0 2.0 0.0 1.9 MB

Foursquare API v2 For iOS and MacOS

Home Page: constantine-fry.github.com

License: MIT License

Ruby 0.99% Objective-C 98.90% Perl 0.11%

foursquare-api-v2's Introduction

#Foursquare API 2.0 For iOS and MacOS

###Features

  • In-App Authentication
  • Asynchronous requests with blocks
  • Build-in image uploader for photos.
  • Made with native framworks:
    • NSJSONSerialization for JSON parsing
    • NSURLConnection for requests

###How To

  1. Create Your application here https://foursquare.com/developers/register

  2. You should modify Foursquare2.h

    1. Change FS2_OAUTH_KEY and FS2_OAUTH_SECRET
    2. Change FS2_REDIRECT_URL. It should start with app://
    3. Change FS2_API_VERSION to your current date, so you will use latest API/
  3. You need to make sure you set up the URL scheme in your info.plist properly

CFBundleURLTypes -> CFBundleURLName -> CFBundleURLSchemes -> {app_id}

###Usefull tips

  1. How to get sw and ne from MKMapView?

     CGPoint swPoint = CGPointMake(mapView.bounds.origin.x, mapView.bounds.origin.y+ mapView.bounds.size.height);
     CGPoint nePoint = CGPointMake((mapView.bounds.origin.x + mapView.bounds.size.width), (mapView.bounds.origin.y));
    
     //Then transform those point into lat,lng values
     CLLocationCoordinate2D swCoord;
     swCoord = [mapView convertPoint:swPoint toCoordinateFromView:mapView];
    
     CLLocationCoordinate2D neCoord;
     neCoord = [mapView convertPoint:nePoint toCoordinateFromView:mapView];
    

###Screnshots

##My other usefull libs CFAsyncImageView - is simple subclass of UIImageView for async downloading image. Very simple and powerfull. No extra code. I use native NSCache class for in-memory image caching.

I got blue pin here.

foursquare-api-v2's People

Contributors

jonathanramirez avatar lmjabreu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.