Facebook Android request error : GraphObject is null -
i'm trying send simple request android facebook sdk. here code :
session.openactivesession( native_activty, true, new session.statuscallback() { @override public void call(session session, sessionstate state, exception exception) { request.callback callback= new request.callback() { public void oncompleted(response response) { if( response.geterror() != null) { log.i( "output", response.tostring()); // here i'm checking token, permissions, ... } } }; bundle params = new bundle(); params.putstring("access_token", session.getaccesstoken()); params.putstring("name", name); params.putstring("caption", caption); params.putstring("description", description); params.putstring("link", link); params.putstring("picture", picture); request request = new request( session, "me/feed/", params, httpmethod.post, callback ); request.executeasync(); log.i( "output", request.tostring() ); } }
but request fails, , response :
i/output(29990): {response: responsecode: 200, graphobject: null, error: {httpstatus: -1, errorcode: -1, errortype: null, errormessage: null}, isfromcache:false}
with error
i/output(29990): com.facebook.facebookexception: not construct request body
i have checked several things :
- permissions ok;
- access_token valid (https://graph.facebook.com/me?access_token={my_token} works fine browser)
- the session state opened
i don't understand why doesn't works, , don't know do...
many thanks
Comments
Post a Comment