1

我正在使用 facebook sdk 在 facebook 墙上分享帖子。我已经成功地在 facebook 墙上分享了帖子,但现在它的样式可以是这样的吗? 脸书墙

我试图发布如下:

public boolean updateStatus(String accessToken, String message){  
    String response="";
    try {         
        Bundle bundle = new Bundle();
        bundle.putString("message", "Message here");
        bundle.putString("description", "description here");
        bundle.putString("name", "abc"); //Name of the link
        bundle.putString("link", "www.abc.com");
        bundle.putString("caption", "link capation");
        bundle.putString("picture", "pic url");
        bundle.putString(Facebook.TOKEN,accessToken);         
        response = facebook.request("me/feed",bundle,"POST");         
        if(response.indexOf("OAuthException") > -1)
        {
            if(mAuthAttempts==0)
            {
                mAuthAttempts++;
                fbAuthAndPost(message);
            }else{
                showToast("OAuthException:");
            }
        }
    } catch (MalformedURLException e) {         
        Log.e("MALFORMED URL",""+e.getMessage());
        showToast("MalformedURLException:"+e.getMessage());
    } catch (IOException e) {         
        Log.e("IOEX",""+e.getMessage());
        showToast("IOException:"+e.getMessage());
    }
}
4

0 回答 0