Tutorials

Posted

Sun Oct 3 2010, 12:12pm

By Aaron Parecki

Categories

API
Tutorials

Tagged

Geoloqi API Example

To quickly write an application for your Geoloqi account, you can request a permanent access token through the “Connections” screen on your account.

Once you have this access token, you don’t need to deal with refreshing the token using the standard OAuth 2 spec. You can use this access token in all requests indefinitely.

Here is an example of retrieving your user profile using the API.


<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.geoloqi.com/1/account/profile');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: OAuth ' . $oauth_token));
$response = json_decode(curl_exec($ch));
print_r($response);
?>

Alternatively, you can pass the oauth token in the query string.

<?php
print_r(json_decode(file_get_contents('https://api.geoloqi.com/1/account/profile?oauth_token=' . $oauth_token)));
?>

See more API methods on the API documentation.

Posted

Sat Oct 2 2010, 11:23pm

By caseorganic

Categories

API
Tutorials

Geoloqi API

If you’re looking to build an app that uses the Geoloqi API, you might find the following diagrams useful.

1. Your application can trigger an action when the user enters a location. To do this, you can simply instruct Geoloqi to notify your app when a user enters an area.

For example, your app can tell Geoloqi to let it know when the user is inside a region defined by a latitude, longitude and radius. Geoloqi will only give away the user’s location when his GPS enabled phone enters one of those areas, preserving privacy.

Your app sends Geoloqi a lat, long radius and callback URL, and Geoloqi stores the trigger, allowing your app to be notified of the user’s location without you having to track the user’s location yourself.

2. When the user runs Geoloqi or Instamapper, their phone continually reports its location to the Geoloqi API.

Geoloqi internally processes the user’s location and compares the location with your app’s location triggers.

If the user’s GPS enabled phone enters within one of the areas set as a trigger zone, the user gets a message or action.

3. When the user enters one of your triggers, Geoloqi sends an update to your callback URL.

You can instruct Tropo to send an SMS or make a phone call to the user’s phone, user’s friend’s phone , twitter or a variety of other sources.

Full image: click to enlarge.

Posted

Sun Aug 22 2010, 3:15pm

By caseorganic

Categories

Tutorials

Tagged

How do I get my Instamapper Device and API Key?

Note: Geoloqi no longer works with Instamapper

Note: This tutorial used InstaMapper, a free GPS tracking and location sharing service. After nearly 5 years of operation, the site shut down on December 13th, 2012.

You can track your location on a number of devices other than the iPhone using Instamapper. You can use all the features of Geoloqi by importing your Instamapper data. To do it, you’ll need Instamapper for iPhone, Android, Blackberry or some Motorola phones.

Here’s how to get your Instamapper device key.

Download Instamapper: iPhone iTunes Link. You can also find it in the Android Market called “GPS Tracker” by Instamapper.

Log in to your Geoloqi account and go to the “Connections” screen. Click on “Create” in the Instamapper section.

In a few seconds, you should get a device key. Enter the Device Key into the settings on your Instamapper app on your iPhone.

Enter your phone number in your profile page so you can receive SMSs. When Instamapper is running on your phone, you will be able to see your location in Geoloqi, and send shared links and geonotes from the website!