简体   繁体   中英

Android facebook graph api add place or location params with photo upload

How can I send the place params while uploading a photo from android to facebook.

Bundle params = new Bundle();

params.putByteArray("photo", byteArray);

params.putString("caption", "FbAPIs Sample App photo upload");

//params.putString("place", "Banglore");

//params.putString("location", "banglore");

Utility.mAsyncRunner.request("me/photos", params, "POST",
    new PhotoUploadListener(), null);

像添加标题一样,将位置添加到参数中。

params.putString("place","someLocation");

You're almost there. Instead of using "Bangalore" for example, pass in the Facebook place ID.

Ex:

params.putString("place", "106377336067638");

For reference, see: https://developers.facebook.com/docs/reference/api/user/#photos

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM