Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to pass my image to facebook feed dialog android

I am using following code to post on a user's wall.

 Bundle params = new Bundle(); 
    params.putString("message", facebookMessage);
    params.putString("link", ComLabelConstants.FACEBOOK_LINK);
    params.putString("name", linkname); 
    params.putString("picture", "http://some link"); 
    params.putString("caption", ComLabelConstants.FACEBOOK_LINK_CAPTION);
    params.putString("description", "This is description"); 
     // displaying facebook dialogs
    mFacebook.dialog(FbookAlertBoxActivity.this, "feed", params,new SampleDialogListener(this, mAsyncRunner)); 

Now, I want to use my own image in drawable folder to post on user's wall and not from any link. Can we do that? anyone have solution for this.

like image 768
RiksAndroid Avatar asked Aug 05 '11 09:08

RiksAndroid


People also ask

What is Facebook dialog?

The Share dialog gives people the ability to publish an individual story to their timeline, a friend's timeline, a group, or in a private message on Messenger. The Share dialog does not require Facebook Login or any extended permissions, so it is the easiest way to enable sharing on the web.


1 Answers

You can't publish an image directly to a feed like you are asking - you can only pass a link to the image.

The only solution is to upload the image to a web server and then pass the URL of the image as the picture parameter.

like image 163
jBit Avatar answered Oct 10 '22 02:10

jBit