android - Unity Facebook SDK: post screenshot to wall not working -
i using unity 4.5, latest facebook sdk 6.0 , working on android right should work on ios. trying take screenshot , upload wall, therefore use standard example scene facebook sdk. works fine when use private account test account, , works facebook app id's of older projects (at least 1 year old). normal account (no tester) , new facebook app not working.
do have full submission use "post image users wall" function or doing wrong? facebook app says "this app public , available users" . guess should work right?
i use login:
private void callfblogin() { fb.login("email, publish_actions", logincallback); } void logincallback(fbresult result) { if (result.error != null) lastresponse = "error response:\n" + result.error; else if (!fb.isloggedin) { lastresponse = "login cancelled player"; } else { lastresponse = "login successful!"; } }
and screenshot method:
private ienumerator takescreenshot() { yield return new waitforendofframe(); var width = screen.width; var height = screen.height; var tex = new texture2d(width, height, textureformat.rgb24, false); // read screen contents texture tex.readpixels(new rect(0, 0, width, height), 0, 0); tex.apply(); byte[] screenshot = tex.encodetopng(); texturetest = tex; var wwwform = new wwwform(); wwwform.addbinarydata("image", screenshot, "interactiveconsole.png"); wwwform.addfield("message", "herp derp. did thing! did right?"); fb.api("me/photos", facebook.httpmethod.post, callback, wwwform); }
hope has solution.
thank you!
as per docs. need submit app review if require publish_actions
permission.
review
if app requests permission facebook have review how app uses it.
when requesting permission via app review, please make sure instructions reproducible our team.
Comments
Post a Comment