Location Labs

  • Company
  • Products
  • Blog
  • Facebook
  • Twitter
  • YouTube
[icon] Universal Location Service

Universal Location Service

  • Overview
  • My Apps
  • Tutorials
  • Test Tools
  • SDK
  • Developer Guide
  • Billing
  • Support
  • Register
  • Sign In

Prepare a Callback

Using the Java SDK

  • About the Java SDK
  • Download the Java SDK
  • Configure the Client
  • Prepare a Callback
  • Identify the User
  • Get the User's Location
  • < back to all tutorials

Prepare a Callback (back to all tutorials)

Most Veriplace API calls use the OAuth redirect and callback process. Before your application can make these calls, it must specify a URL for this callback.

  1. Option 1: Hardcode a Callback

    The simplest approach is to hardcode your callback to a fixed URL:

  2. Option 2: Determine Callback from HttpServletRequest

    In many cases, you will want to generate a callback that refers back to the same server (host and port) that initiated the request. The SDK offers any easy way to construct such a callback from an HttpServletRequest:

    The boolean argument in this example controls whether the callback includes path information from the request; you can override this and other callback behavior by using the com.veriplace.client.factory.DefaultCallbackFactory directly:

  3. Option 3: Define a CallbackFactory

    If you wish to configure a callback through some other mechanism, you can implement your own version of com.veriplace.client.factory.CallbackFactory. This is particularly useful in conjuction with the Verplace web framework.

  • next: Identify the User >

Developers

  • Developer Terms of Service
  • Privacy Policy
  • Content Requirements
  • Trademark Schedule
  • Forum

End Users

  • Terms of Service
  • Privacy Policy
  • Support

Follow Us

  • [icon] Facebook
    Facebook
  • [icon] Twitter
    Twitter
  • [icon] YouTube
    YouTube

Location Labs

info@location-labs.com

© 2010 Location Labs

All rights reserved.