chipbk10
chipbk10

Reputation: 5955

Cannot create a custom com.facebook.Request.Callback

I send a Graph API request as follow:

Request request = new Request(session, graphPath, params, HttpMethod.GET, new CustomCallBack());

In which my CustomCallBack implements the com.facebook.Request.Callback:

private class CustomCallBack implements Callback{

    public CustomCallBack(){

    }

    @Override
    public void onCompleted(Response response) {

    }

}

It announced error like

Illegal modifier for the local class CustomCallBack; only abstract or final is permitted

Can anyone explain why?

Upvotes: 0

Views: 138

Answers (1)

clockwerk
clockwerk

Reputation: 263

https://developers.facebook.com/docs/android/publish-to-feed/#step3 from the example there you can see that Callback is interface in Request. change class header to

public class YourCallback implements Request.Callback

Upvotes: 0

Related Questions