简体   繁体   中英

Post params to facebook wall with android

Im trying to post to facebook with the facebook sdk, I set up my parameters in the dialog box but they do not show up when I go to post... any help? Facebook says pass the parameters name and description which I do... but nothing is showing up..

public void postToWall(View v){

 Bundle parameters = new Bundle();    
  parameters.putString("name", "My App test");
  parameters.putString("description", "This is a test");


  facebook.dialog(this, "feed", parameters, new     
    DialogListener() {

    @Override
    public void onFacebookError(FacebookError e) {
    }

    @Override
    public void onError(DialogError e) {
    }

    @Override
    public void onComplete(Bundle values) {





    }

    @Override
    public void onCancel() {
    }
});
}

The "name" and "description" are only applicable if you also have a "link" parameter (which is a url string).

Here's the doc for the feed dialog: https://developers.facebook.com/docs/reference/dialogs/feed/

For "name": "The name of the link attachment."

For "description: "The description of the link..."

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