Question

I am building an android app which needs to share some content (image + text) to Facebook, using facebookDialog. The dialog works perfectly when using a Facebook developer account, but when using a regular account, the dialog appears and then disappears instantly. I have tried passing FORCE_DIALOG_AUTH, as i have seen in some similar posts, but in the best case it just keeps the dialog opened a couple more seconds. Code is pretty straight-forward:

FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(getActivity())
                            .setLink("https://developers.facebook.com    /android").setDescription("a description")
                        .setPicture(mPlant.default_document().getServerImagePath())
                        .build();

LE: it looks like the dialog only works with the developer account which generated the app id, the problem is with any other fb account Thanks in advance

Was it helpful?

Solution

enter image description here

> hope this image makes it clear  that unless you make this app live you
>     cannot test it from other account.
>     There are solutions to add tester
>     accounts if you want to test it from any other account instead of developer account,                      
>     then in "Roles" tab add a tester account,then test 
>     through this account.

OTHER TIPS

Please provide error log so that it's easy to find your bug. But while using Facebook SDK in your app, you need to follow a few procedures:

  1. Register your app on Facebook. After registering you will get a Facebook ID.
  2. After that you need to provide your apps package name and class name in which you are using Facebook.
  3. You need to add your hash key to the Facebook setting page.

Found the answer. It needed Facebook app to be updated. strange thing at least they could have propagated correct message that could have save our time.

I tried restarting my `phone but didn't work. I tried same source code on different 'phone and everything started working. I have no clue on what's wrong in the phone that I was working with.

Hope this could help someone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top