Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ask one question about "like/unlike" #10

Closed
langkins opened this issue Jun 2, 2010 · 1 comment
Closed

ask one question about "like/unlike" #10

langkins opened this issue Jun 2, 2010 · 1 comment

Comments

@langkins
Copy link

langkins commented Jun 2, 2010

pls read the source code as below (from stream example):

public void like(final String post_id, final boolean val) {
    Bundle params = new Bundle();
    if (!val) {
        params.putString("method", "delete");
    }
    getFb().request(post_id + "/likes", new Bundle(), "POST",
            new AsyncRequestListener() {

        public void onComplete(JSONObject response) {
            callJs("javascript:onLike('" + post_id + "'," + val + ")");
        }
    });
}

i do not know why pass a "new Bundle()" not the "params", to the request call.
could you tell me ?thank you.

@langkins
Copy link
Author

langkins commented Jun 2, 2010

and i also want to know what is the usage of "method=delete" set to the params.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant