android - Instagram Rest API user Relationship -follow/unfollow error -
am stuck instagram issue. requesting target user follow/unfollow . have tired using in 2 ways . none of them worked.
asynchttpclient client = new asynchttpclient(); client.settimeout(constant.timeout);
1
client.post( "https://api.instagram.com/v1/users/" + userid2 + "/relationship?"+ "access_token=" + utils.getfromuserdefaults(mcontext, constant.param_accesstoken)+"&action=follow", new followinstagramresponsehandler(true, position, holder));
but url worked in browser
error:
{"meta":{"error_type":"apiinvalidparameterserror","code":400,"error_message":"please supply action=follow,unfollow,approve,ignore,block,unblock"}}
2
requestparams params = new requestparams(); params.put("action","follow") client.post( "https://api.instagram.com/v1/users/" + userid2 + "/relationship?"+ "access_token=" + utils.getfromuserdefaults(mcontext, constant.param_accesstoken), params, new followinstagramresponsehandler(true, position, holder));
getting same error in 1.
please me out.
hahaha. worked when changed params key/values pairs either small/capital letters.
requestparams params = new requestparams(); params.put("action","follow")//caps small. :o client.post( "https://api.instagram.com/v1/users/" + userid2 + "/relationship?"+ "access_token=" + utils.getfromuserdefaults(mcontext, constant.param_accesstoken), params, new followinstagramresponsehandler(true, position, holder));
Comments
Post a Comment