This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Foursquare and Facebook Check-In integration in Maps

1.1. Short Description

The aim of this project is to add social integration in GNOME Maps, namely, Foursquare and Facebook Check-In integration. User will be able to checkin to places and see last known checkin location of their friends. This will require some work in both gnome-maps and gnome-online-accounts components. Also, I'll work in the GtkPopover integration within GNOME Maps markers, opening paths for a more content rich map application.

1.2. About Me

I'm Damián Nohales, 23 years old Software Engineering student at CAECE University from Mar del Plata, Argentina. You can contact me at,

1.3. Schedule

A tentative schedule on how I'm going to proceed is the following

April 24st - May 7th

Start understanding GNOME Online Accounts.

May 8th - May 20th

Start implementing Facebook Check-In integration in GOA (that includes necessary changes in GOA provider, understanding Facebook API and example code that perform a check-in and get contacts check-in).

May 21th - June 8th

Start implementing Foursquare integration in GOA (that includes Foursquare provider creation, understanding Foursquare API and example code that perform a check-in and get contacts check-in).

June 9th - June 15th

UI design to perform a check-in in GNOME Maps (may require a feed post dialog).

June 16th - July 13th

Midterm evaluation and start coding the check-in UI.

July 14th - July 18th

UI design to get information about contact check-in's.

July 19th - July 25th

Start coding the contact check-in feature.

July 26th - August 18th

Start implementing GtkPopover within Maps markers to show rich location information to the users.

1.4. Implementation documentation

1.4.1. Add a new provider feature

We need to add a new feature, namely the checkin feature, that means org.gnome.OnlineAccounts.Checkin D-Bus interface and GOA_PROVIDER_FEATURE_CHECKIN enum, as a guide, we can see the commit where Pocket provider was added:

https://git.gnome.org/browse/gnome-online-accounts/commit/?id=6aedcc5bffa57b0b19a4b029985410390e3f1aeb

Status: done, see https://bugzilla.gnome.org/show_bug.cgi?id=729740

1.4.2. Modify GOA Facebook provider

Once we created the new checkin feature, we need to modify Facebook provider to tell the GOA clients that Facebook implements that feature. We need to:

Status: done, see https://bugzilla.gnome.org/show_bug.cgi?id=729740

1.4.3. Add Foursquare support in GOA

Add a provider in GOA to support login with Foursquare. Foursquare login is very similar to the Facebook login, both needs an API key and a secret key but there is a flow where apps doesn't need to expose the secret key, in Foursquare, this flow is called "Token flow", this is the flow that GOA is going to use.

More Information

We can check the commit where Pocket provider was added to get the idea:

https://git.gnome.org/browse/gnome-online-accounts/commit/?id=6aedcc5bffa57b0b19a4b029985410390e3f1aeb

Status: on review, see https://bugzilla.gnome.org/show_bug.cgi?id=729837

1.4.4. Add Check-In GUI in GNOME Maps

Add a GUI in GNOME Maps that allows user to perform a check-in.

Status: on review, see https://bugzilla.gnome.org/show_bug.cgi?id=731113

1.4.5. Add "See friends check-in" feature

Goals

After analyze the APIs from both services, Facebook and Foursquare, the conclusions are:

So, to keep it simple, user will need a Foursquare account to access this feature.

Implementation

Since the Foursquare API function gives to us the user recent check-ins around the world, not per bounding box or location, a ChamplainTileSource based implementation (like ones used in the POI feature) is not feasible.

There will be two main components for this feature:

Other classes to be implemented will be:

The algorithm:

class CheckInProvider
{
    func init() {
        loadCache();
        refreshMarkers();
        interval(time: 10min, fetchCheckIns);

        if (cache.age > 10min) {
            fetchCheckIns();
        }
    }

    func refreshMarkers() {
        showMarkersOnCache;
    }

    func saveToCache(checkIns) {
        cache.removeOldCheckIns();
        cache.add(checkIns);
        cache.save();
    }

    func loadCache() {
        cache.load();
        //We don't want to show old check-ins at startup
        cache.removeOldCheckIns();
        cache.save();
    }

    func fetchCheckIns() {
        checkIns = CheckInManager.findRecentCheckins();
        saveToCache(checkIns);
        refreshMarkers();
        showNotification();
    }
}

Remarks and questions

Status: on development, see https://bugzilla.gnome.org/show_bug.cgi?id=732509

1.4.6. Refactorize markers code and use GtkPopover in markers

This includes a refactorizations in the MapLocation and UserLocation classes to make the addition of different kind of markers easier and to add support to show a bubble related to the marker, using GtkPopover. This feature will be used to other related Maps GSoC projects.

Status: on review, see https://bugzilla.gnome.org/show_bug.cgi?id=722871

1.5. More Resources

1.6. TODO


2024-10-23 11:28