Android页面上的Android facebook上传照片

时间:2017-07-19 08:08:44

标签: android facebook sdk

大家好我正在尝试将照片上传到Facebook上的页面。这是我试图发布照片的页面https://www.facebook.com/manegedagen/

我一直在使用以下代码:  public static void postImageOnWall(Bitmap pBitmap){

    Bundle bundle =new Bundle();
    bundle.putString("method", "photos.upload");
    bundle.putString("picture","http://www.demos.com/LangGuage/medal_1.png");
    new GraphRequest(
            AccessToken.getCurrentAccessToken(),
            "/2091172661108128/feed",
            null,
            HttpMethod.POST,
            new GraphRequest.Callback() {
                public void onCompleted(GraphResponse response) {
                /* handle the result */
                    Log.e("", "");
                }

            }
    ).executeAsync();


}

但是我收到一条错误消息:OAuthException:errorMessage:参数无效。如果我能得到任何指导或帮助,我将非常感激。

1 个答案:

答案 0 :(得分:0)

尝试使用参数而不是null

查看此参考文献中的选定答案: https://stackoverflow.com/a/29770773/6011938