Facebook请求,最终对象状态错误

时间:2012-08-16 22:03:48

标签: android facebook

收到以下错误:

The method request(String, Bundle, AsyncFacebookRunner.RequestListener, Object) in the type AsyncFacebookRunner is not applicable for the arguments (String, Bundle, String, AsyncFacebookRunner)

我不明白,请求中的最终对象是什么?

我有以下代码(有人可以解释)

public void UpdateStatusWithAppInfo(String AccessToken)
{
    Bundle params = new Bundle();

    params.putString("message", "Test");
    params.putString("name", "American Virgin");
    params.putString("link", "http://bit.ly/12345");
    params.putString("description", "A Freshman College Girl on a scholarship from an ...");
    params.putString("picture", "http://xxx/MOV1026.jpg");

    mAsyncRunner.request("me/feed", params, "POST", mAsyncRunner.RequestListener
    {
        public void onComplete(String response, Object state){}
        public void onIOException(IOException e, Object state){}
        public void onFileNotFoundException(FileNotFoundException e, Object state) {}
        public void onMalformedURLException(MalformedURLException e, Object state) {}
        public void onFacebookError(FacebookError e, Object state) {}
    }
}

1 个答案:

答案 0 :(得分:1)

对于那些坚持这一点的人我做了这个:

public void UpdateStatusWithAppInfo(String AccessToken)
{
    Bundle params = new Bundle();

    params.putString("message", "Test");
    params.putString("name", "American Virgin");
    params.putString("link", "http://www.polygonattraction.com/images/lovebirds.jpg");
    params.putString("description", "A Freshman College Girl on a scholarship from an ...");
    params.putString("picture", "http://www.polygonattraction.com/images/lovebirds.jpg");
    params.putString(Facebook.TOKEN, AccessToken);

    mAsyncRunner.request("me/feed", params, "POST", new RequestListener()
    {
        public void onComplete(String response, Object state){System.out.println(response);}
        public void onIOException(IOException e, Object state){}
        public void onFileNotFoundException(FileNotFoundException e, Object state) {}
        public void onMalformedURLException(MalformedURLException e, Object state) {}
        public void onFacebookError(FacebookError e, Object state) {}
    }, null);

}