Post message to facebook wall from android fb sdk always error

前端 未结 3 820
情话喂你
情话喂你 2020-12-01 08:28

I have problem with fb sdk for Android (downloaded from http://github.com/facebook/facebook-android-sdk). Tried to post wall but always get error (permission already set and

3条回答
  •  天涯浪人
    2020-12-01 08:58

    That's really weird... I have an app which uses the same syntax but it works really well. I just check the source code of the FB SDK and it seems it has changed a lot... I found this on the SDK src:

        for (String key : params.keySet()) {
            if (params.getByteArray(key) != null) {
                    dataparams.putByteArray(key, params.getByteArray(key));
            }
        }
    

    So, you try to do this:

    Bundle params = new Bundle();
    
    params.putByteArray("message", "Test".getBytes());
    params.putByteArray("name", "American Virgin".getBytes());
    params.putByteArray("link", "http://bit.ly/12345".getBytes());
    params.putByteArray("description", "A Freshman College Girl on a scholarship from an ...".getBytes());
    params.putByteArray("picture", "http://xxx/MOV1026.jpg".getBytes());
    
    mAsyncRunner.request("me/feed", params, "POST", new TestRequestListener());
    

提交回复
热议问题