After multiple developer accounts

I added the Facebook wall post feature in my Android app using the below code, but when I try to post the data, the access dialog is shown for a few seconds and then it disappears. I am getting an error in the FacebookDialog.Callback onError method as "Failed to create preview for user" and the exception in my logcat as "ApiException: [code] 100 [message]: (# 100) 12345 app is not allowed to create actions type namespace_asd : xyz for user 54321 ":

    OpenGraphObject obj = OpenGraphObject.Factory.createForPost("abc");
    obj.setProperty(
            "title",
            "message goes here");
    obj.setType("namespace_asd:xyz");


    List<Bitmap> imageArr = new ArrayList<Bitmap>();
    imageArr.add(bmp1);

    OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
    action.setProperty("abc", obj);
    action.setType("namespace_asd:xyz");


    FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(this, action, "abc").setImageAttachmentsForObject("abc", imageArr,
            true).build();

    uiHelper.trackPendingDialogCall(shareDialog.present());

      

Sharing only works with developer accounts, not other accounts. I ended up approving the required permissions (like publish_actions) from the Facebook upload process.

I've also included a check for the availability of publicly available features in the Status & Overview section.

Please help .... Thanks in advance.

+3


source to share


2 answers


Thanks to Min Li and everyone who helped, I got the open graph object approval and now the developer user can post to Facebook as well.



+3


source


When your application is in sandbox / development mode, you cannot make any api call for another user. Another user can use your application while it is open to another user. To test your app for another user, add the user as a tester, developer, or administrator. See details



Note. Your app is available to other users when your app is approved by facebook store after viewing your app. To submit your app for viewing see here

0


source







All Articles