Create a common Object facebook sdk android fitness.runs -


i try create common object code:

bundle params = new bundle(); params.putstring("type", "fitness.course"); params.putstring("url", "http://samples.ogp.me/136756249803614"); param.putstring("title", "sample course");        params.putstring("description", ""); request request = new request( session.getactivesession(), "me/objects/fitness.course", params, httpmethod.post, new request.callback(){ @override public void oncompleted(response response) { if(response.geterror()==null) system.out.println("object succesfully created!!"); else system.out.println("object not  created!!"+response.geterror());                                            }}              ); response response = request.executeandwait(); 

but read in logcat:

  10-07 15:33:04.009: i/system.out(23284): object not created!! {httpstatus: 400, errorcode: 2500, errortype: oauthexception, errormessage: cannot specify type in both path , query parameter.} 

i dont understand error message... do create course object , update data (gps status) of course? need of end server store data of course? back-end server option?

your error message says all, you're supplying og:type both post request , url.

as of new fb opengraph sdk, can have ad-hoc url-less objects. you're trying use api while @ same time using self-hosted version of api.

i'd suggest either taking url parameter out, taking og:type out of url have set up, , giving documentation second read. here documentation self hosted objects , here article app owned objects.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -