android - issues posting picture to Facebook - "session.requestNewPublishPermissions" -
i having issues posting pictures facebook application.
initially built test application next tutorials here
http://developers.facebook.com/docs/howtos/androidsdk/3.0/publish-to-feed/
using code tutorial able post pictures facebook wall.
today, attempted add together feature existing application have been working on. reason not able post pictures using similar code.
i debugged application , found app hanging on line within publishstory method
session.requestnewpublishpermissions(newpermissionsrequest);
the entire publishstory method looks this
private void publishstory() { session session = session.getactivesession(); log.d(tag, "in publish story"); if (session != null) { // check publish permissions list<string> permissions = session.getpermissions(); if (!issubsetof(permissions, permissions)) { pendingpublishreauthorization = true; session.newpermissionsrequest newpermissionsrequest = new session.newpermissionsrequest( this, permissions); session.requestnewpublishpermissions(newpermissionsrequest); return; } request.callback callback = new request.callback() { public void oncompleted(response response) { log.d(tag, "facebook on complete"); jsonobject graphresponse = response.getgraphobject() .getinnerjsonobject(); string postid = null; seek { postid = graphresponse.getstring("id"); } grab (jsonexception e) { log.i(tag, "json error " + e.getmessage()); } facebookrequesterror error = response.geterror(); if (error != null) { toast.maketext(getapplicationcontext(), error.geterrormessage(), toast.length_short) .show(); } else { toast.maketext(getapplicationcontext(), postid, toast.length_long).show(); } } }; request request = request.newuploadphotorequest(session, staticvariables.combinedbitmap, callback); requestasynctask task = new requestasynctask(request); task.execute(); } }
i not sure why working in 1 application not other. in truth, entire facebook sdk klingon me, have not been able take away debugger help me.
i did find thread here, hasn't worked me either
statuscallback not called after requestnewreadpermissions requestnewpublishpermissions
any help appreciated
thanks
android facebook facebook-graph-api
No comments:
Post a Comment