Mobility Ecanarys
Mobility Ecanarys

Reputation: 13

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);

Upvotes: 1

Views: 1014

Answers (2)

C Abernathy
C Abernathy

Reputation: 5523

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

Upvotes: 0

PearsonArtPhoto
PearsonArtPhoto

Reputation: 39698

Add the place to the params, much like you did the caption.

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

Upvotes: 1

Related Questions