EzDevInfo.com

foursquare

The Foursquare API client for Python foursquare 1!2015.5.26 : Python Package Index easy-as-pie foursquare wrapper library

How to integrate Foursquare in android

Please tell me is there any way to integrate Foursquare in android. Can you give me some idea or link to integrate Foursquare in android?

Please help.


Source: (StackOverflow)

Construct Profile Picture URL

Most social apis have a way to construct a url to the user's profile picture using their user_id or username. Any chance foursquare has something similar or plans to?

http://graph.facebook.com/702855/picture

http://api.twitter.com/1/users/profile_image/akdotcom.png


Source: (StackOverflow)

Advertisements

Use of FourSquare API to find nearby places in iOS SDK

How to use Foursquare API to find nearby places in iOS Applications.

As I am new in this environment.. So please help me to find any sample tutorial available on the API.

I had gone through this link, And I got the response "error type" : deprecated so please provide another link for this same solution..

Thanks in advance..


Source: (StackOverflow)

Using Httplib2 on Python Appengine

Why am I getting this error when running my application which is trying to OAuth with Foursquare?

import httplib2
ImportError: No module named httplib2

I have installed httplib2 by downloading it and $ python setup.py install on the command line as instructed here

Am I missing something? Thanks


Source: (StackOverflow)

New foursquare venue detail map

I really love the way foursquare designed venue detail view. Especially the map with venue location in the "header" of view ... How was it done? Details are obviously some uiscrollview (maybe uitableview?) and behind it (in the header) there is a map so when you scroll up the map is beeing uncovered as the scroll view bounces... does anyone has an idea how to do this?

enter image description here


Source: (StackOverflow)

How can I watch a Foursquare venue for check-ins?

The FourSquare API seems to be very user-centric: After logging in via OAuth I can see my friends check in, and which of my friends are currently checked into a given venue.

I'm looking for something more venue-centric, where I can get a list of everybody currently checked into a venue (friends and non-friends), or ideally receive a notification each time there is a new check-in at a specific venue. Is this possible with the existing V2 API?


Source: (StackOverflow)

Foursquare checkins

Any idea what can I do to get only the checkins from a specific venue?

If i use it like:

https://api.foursquare.com/v2/venues/VENUE_ID?oauth_token=XXX

i get everything about the venue, and I only need the checkins.

Anyone has a solution? Thanks.


Source: (StackOverflow)

Android - ScrollView like foursquare with maps + list

This is the Android equivalent of this iOS question.

Trying to create a view that contains a MapView at about 20% of the screen (under an ActionBar...) and the rest of the screen is a ScrollView that when scrolling down, overlaps on top of the MapView and hides it. In short like FourSquare's Android app. Any ideas?


Source: (StackOverflow)

Swarm App Android - Actionbar

What is the element that is used for Swarm Android app's actionbar? I think it's neither the native android actionbar nor actionbarsherlock.

screenshot of swarms actionbar


Source: (StackOverflow)

How do popular apps authenticate user requests from their mobile app to their server?

Say I have an Android app that connects to a .Net api for receiving/setting data. The confusion that I have is regarding how to signup/login the user first time and authenticate it every time he makes a request to the api.

  • If I just use username/password based authentication the wont be safe enough?
  • And I cant save that username/password in the device for of course security reasons?
  • Should I issue a GUID for every user at the signup, save it in their device and retrieve every time during an api request?

What other patterns are available and which are most efficient and secure, I just need a process flow for it. Can someone tell me what method famous android apps likes Facebook, foursquare, twitter uses to authenticate every request coming from their mobile app to their server?

Sorry in advance if that's not some public information.


Source: (StackOverflow)

Foursquare API for venue user image error

The Foursquare API has divided its photo tag for user as prefix and suffix. But if I merge them to form a full image URL and paste this in my browser, gives me errors that says the image can't be displayed because it contains errors. Is it because server is temporarily unavailable or anything else?

I am using the API for Venue Detail.

I got the data like this

user: {

id: "26534686"
firstName: "Bobbi"
lastName: "E."
photo: {
    prefix: "https://irs3.4sqi.net/img/user/"
    suffix: "/K4VCI4MXHWFUGXOF.jpg"
}
}
visibility: "public" 

But when I call this url https://irs3.4sqi.net/img/user/K4VCI4MXHWFUGXOF.jpg gives me error.

Any clue?


Source: (StackOverflow)

How do I parse URL params after a hash with Angularjs?

I'm trying to parse for the access_token from Foursquare where the URL is like this:

https://mywebsite.com/4sqredirect/#access_token=1234567890XXXXX

I've tried $routeParams and $location and get nothing returned. Only after I tried $route, I did get an object back with the following attribute in it:

current:  { 
    params:  {  } 
    pathParams:  {  } 
    loadedTemplateUrl: partials/4sqredirect
    locals:  {  } 
    scope:  { 
        this:  { 
            $ref: $["current"]["scope"]
        } 
        route:  { 
            $ref: $
        } 
        location:  {  } 
        token: null
    }
} 

Does this mean there's no way to get it using native AngularJS functions cause of the hash?

UPDATE:

my controller looks like as follows:

angular.module('myApp')
    .controller('4sqredirectCtrl', function ($scope, $route, $location, $routeParams) {
        $scope.route = $route;
        $scope.location = $location;
        $scope.token = $routeParams.access_token;
    });

my main js looks like as follows:

angular.module('myApp', [
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngRoute'
])
.config(function ($routeProvider, $locationProvider) {
    $locationProvider.html5Mode(true);

    $routeProvider
    .when('/', {
        templateUrl: 'partials/main',
        controller: 'MainCtrl'
    })
    .when('/4sqredirect/', {
        templateUrl: 'partials/4sqredirect',
        controller: '4sqredirectCtrl'
    })
    .otherwise({
        redirectTo: '/'
    });
});

Source: (StackOverflow)

python foursquare - SSL3 certificate verify failed

I'm trying to make a userless request to the Foursquare API using Mike Lewis' Python wrapper - https://github.com/mLewisLogic/foursquare:

client = foursquare.Foursquare(client_id=Client_ID, client_secret=Client_Secret)
categs = client.venues.categories()

Intermittently, I get a "Error connecting to Foursquare API" msg. Running a logger to catch a more detailed message produces:

"SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"

This didn't use to happen and occurs both on my local Windows development machine and on a server running ubuntu. Am I missing something basic here about security certificates? The problem is intermittent and sometimes just leaving it a minute and retrying fixes the problem temporarily.

I've downloaded the latest 20120716 version of the wrapper although in the code for init.py it still says API_VERSION = '20120608'. I'm using Python 2.73 and have also signed up for the Foursquare API key, using the id and secret in the above code. I listed the urls, using my local IP:8000 and tried using separate keys for the local and dev machines but this seems to make no difference.

Help much appreciated. Thanks.


Source: (StackOverflow)

Small Popup for Instructions, like foursquare ones

After seeing the last screenshots of new foursquare application and their balloon like cartoon instructions, I'd like to create some of these in my application.

I found a similar question for iPhone Small popup for instructions... How?

Here is another screenshot of foursquare app: enter image description here

I'd like to know how I could achieve that with Android.

Thanks in advance for any help.

UPDATE: This is what I could get so far but adding some buttons with a custom drawn background and layering them with a FrameLayout:

enter image description here

But I still couldn't get the triangle effect. Maybe there is something I can do with my custom background shape?

UPDATE2

After checking your suggestions, I decided to go with Aaron C idea and added an image with an arrow on it. This is my current result:

enter image description here

Thank you Snailer, QuickAction API project seems very much promissing. I'll check it out when implementing more features in my app.

Now, I just need to get the right color or maybe I could just let it this way. It seems nice too.

And, so, to summarize what I did:

  1. Got my initial xml layout inside a FrameView.
  2. As I'm using a frameview, everything I put in here will be piled one over the other. That's how I could add things to the layout.

  3. In that framelayout, I put 2 relativelayouts whith an image with the triangle and a button to create the two upper popups. In the bottom I put a button only.

  4. That's it. I hope it helps somebody.

Thank you very much again for all your help!


Source: (StackOverflow)

What's the best way to tune my Foursquare API search queries?

I'm getting some erratic results from Foursquare's venue search API and I'm wondering if anyone has any tips on how to process my input parameters for the most "intuitive" results.

For example, suppose I am searching for a venue called "Ise Sushi", around "New York, NY", which is equivalent to (lat: 40.7143528, lon: -74.00597309999999) using Google Maps API. Plugging into the Foursquare Venue API, we get:

https://api.foursquare.com/v2/venues/search?query=ise%20sushi&ll=40.7143528%2C-74.00597309999999

This yields pretty underwhelming results: the venue I'm looking for ends up rather far down the list, at 11th place. What's interesting is that reducing the precision of the coordinates appears to produce much better results. For example, suppose we were to round the coordinates to 3 significant digits:

https://api.foursquare.com/v2/venues/search?query=ise%20sushi&ll=40.7%2C-74.0

This time, the venue I'm looking for ends up in 2nd place, even though it is actually farther from the center of the search (1072 meters, vs. 833 meters using the first query).

Another modification that appears to help improve the quality of search is substituting underscores for spaces to separate our search terms. For example, here's the original query with underscores:

https://api.foursquare.com/v2/venues/search?query=ise_sushi&ll=40.7143528%2C-74.00597309999999

This produces the most intuitive-seeming results: the venue I'm looking for appears first, and is accompanied by just one other result, "Ise Restaurant" (which is tagged as a "sushi restaurant"). For what it's worth, this actually seems to be the result set of the same search conducted on Foursquare's own website.

I'm curious what lessons I should be learning from this. Should I be reducing the precision of my coordinates? Should I be connecting my search terms with underscores, and if so, does that limit how a user can order their search terms?


Source: (StackOverflow)