English 中文(简体)
Fourquare提供的地点数据
原标题:Data of places from Fourquare

我试图使用 rel=“nofollow”>Venue 。但是没有回应。

      try {
         HttpClient client = new DefaultHttpClient();  
         String getURL = "https://api.foursquare.com/v2/venues/4cbd52efd78f46881cf1cc73";     
        HttpGet get = new HttpGet(getURL);
        HttpResponse responseGet = client.execute(get);  
        HttpEntity resEntityGet = responseGet.getEntity();  
        if (resEntityGet != null) {  
            // do something with the response
            String response = EntityUtils.toString(resEntityGet);
            Log.i("GET RESPONSE", response);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

如何使用这个?

请救救我

谢谢

问题回答

您应该查询您的纬度和经度以获得最近的位置。 这样做是有道理的 。

将您下面的 URL 更改为最近的地址 :

String getURL = "https://api.foursquare.com/v2/venues/search?ll="Your Latitude","Longitude"&intent=checkin&limit=50&oauth_token=MVVYZJAO0V4UNTA3YFHGI5YO2YEXIM3TTLW1GO2YZNOZZXER";

<强 > - 纬度 & amp; 经度

< 坚固 > oauth_ tok - 您有效的调制调制调

< 坚固 > Limit < / 坚固 > - 如您所喜欢的,靠近您

Foursquare API 的几乎每一个查询都必须包含有效的 OAUT 符号。 在有些情况下, 比如您的, 您可以使用 Foursquare 在注册您的应用程序后给您的客户身份和客户端机密( 但如果你想分发您的应用程序, 则这是一个坏主意 ) 。 在将该符号附加到 URL 之后, 您会得到 JSON 的回复 。

您可以在“https://github.com/foursquare/android-oauth-example” rel=“nofollow”标题=“GitHub 仓库”中找到关于Android的 OAUD 标志的示例。这个GitHub 仓库





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签