开发者

Issue in 2.3.3 when posting to Facebook from android app

开发者 https://www.devze.com 2023-04-04 00:00 出处:网络
I have an android app that posts to users wall by using the Facebook for android API. When user presses a button a dialog to log in to Facebook and then share a predefined text to his FB-wall. This wo

I have an android app that posts to users wall by using the Facebook for android API. When user presses a button a dialog to log in to Facebook and then share a predefined text to his FB-wall. This works perfect i开发者_JS百科n the emulator in every version from 2.1 through 2.3.3, and also with devices tested with 2.2. However on devices with 2.3.3 (tested with SGII, SGI, HTC-Evo-3D), Facebook is just loading and then is suddenly finished and the previous activity (with the button) is displayed(FB dialog closed), and nothing gets posted.

No error message is given in LogCat.

Code:

    PermanentFacebook pf = new PermanentFacebook(activity, FACEBOOK_APP_ID);
    Bundle parameters = new Bundle();
    parameters.putString("link", url);
    parameters.putString("picture", imageURL);
    parameters.putString("name", title);
    parameters.putString("caption", caption);
    parameters.putString("actions", "[{\"link\":\"http://www.stackoverflow.com\", \"name\":\"stackoverflow.com\"}]");
    pf.dialog(activity, "stream.publish", parameters);

The PermanentFacebook class extends Facebook class in the API that I might provide to you, but the question I'm asking here is why it doesn't work in devices with version 2.3.3.

I have tried to google but can't find anything relevant, except from this guy that might have had a similar issue. Any suggestions for what the problem might be? Anyone aware of a bug with the API?


The problem finally proved to be with the debug.keystore file located in /trunk/android/.settings . (my co-developer had a different version than me). I think it worked in the different emulators and a 2.2 device because they didn't have the FB app installed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号