如何使用android facebook SDK将位置信息放入照片并上传到facebook

问题描述 投票:0回答:1

我正在考虑发布仅包含纬度和经度的照片。我都尝试过 - bundle.putString("位置","\"纬度\":"+纬度+",\"经度\":"+经度); - bundle.putString("坐标","\"纬度\":"+纬度+",\"经度\":"+经度);

均返回成功,但facebook中的照片中没有显示位置信息。

android facebook facebook-graph-api photo
1个回答
0
投票

检查此片段以添加位置:

            try {
                Bundle params = new Bundle();
                JSONObject coordinates = new JSONObject();
                coordinates.put("latitude", "Your Latitude");
                coordinates.put("longitude", "Your Longitude");
                params.putString("coordinates", coordinates.toString());
                params.putString("Message", "Bla Bla Bla");

                // Do your stuffs for Post
            } catch (Exception e) {

            }
© www.soinside.com 2019 - 2024. All rights reserved.