Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post pic on wall with message with Android Facebook SDK 3.0

How can i post message along with Picture using Facebook SDK 3.0 on Android,

The link -> can post small pic with link and all other information.

http://developers.facebook.com/docs/howtos/androidsdk/3.0/feed-dialog/

What i want, is only to post Pic on wall with message, not a link with description ? I want grab screen shot of my current Android screen that i did and saved it into SD card, i need to post it with message on custom button click.

How can i do this with Facebook SDK 3.0 for android ?

like image 341
SML Avatar asked Nov 29 '22 13:11

SML


1 Answers

You can use the Graph API to post photos to a user's wall.

See the reference page for more details.

In the Facebook SDK, you would use the Request class to make Graph API calls.

You can use the newUploadPhotoRequest method to add a photo.

If you want to add a description as well, try setting the "message" parameter:

Request photoRequest = Request.newUploadPhotoRequest(...);
Bundle params = photoRequest.getParameters();
params.putString("message", "description  goes here");
photoRequest.executeAsync();
like image 186
Ming Li Avatar answered Dec 15 '22 07:12

Ming Li