RevokePermissionListener无法解析为类型

时间:2012-08-19 16:08:51

标签: android facebook

为什么我的日食会向我显示此错误?我正在尝试为Android实现facebook APi,但它给了我上面的错误原因?

他们在documentation中提到要将其注销。 这是代码。

String method = "DELETE";
Bundle params = new Bundle();
/*
* this will revoke 'publish_stream' permission
* Note: If you don't specify a permission then this will de-authorize the application completely.
*/
params.putString("permission", "publish_stream");
mAsyncRunner.request("/me/permissions", params, method, new RevokePermissionListener(), null);

我将其放在onComplete

mAsyncRunner.logout函数中

1 个答案:

答案 0 :(得分:0)

您必须创建实现RevokePermissionListener的类AsyncFacebookRunner.RequestListener()。在同一文件中,添加以下代码:

public class RevokePermissionListener implements AsyncFacebookRunner.RequestListener {

    @Override
    public void onComplete(String response, Object state) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onIOException(IOException e, Object state) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onFileNotFoundException(FileNotFoundException e, Object state) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onMalformedURLException(MalformedURLException e, Object state) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onFacebookError(FacebookError e, Object state) {
        // TODO Auto-generated method stub

    }

}