Oliver Dixon
Oliver Dixon

Reputation: 7424

Facebook Request, final Object state error

Getting the following error:

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

I don't understand, what is the Final Object within request?

I have the following code (Can someone explain please)

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) {}
    }
}

Upvotes: 0

Views: 344

Answers (1)

Oliver Dixon
Oliver Dixon

Reputation: 7424

For anyone else that's stuck on this I did this:

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);

}

Upvotes: 1

Related Questions