Android Facebook message does not work when Facebook application is already installed on the device

I have an application that sends a string to a user’s wall. The application worked fine in the emulator, but I could not get it to work on a real device. At first I thought I had a problem with a hash key. But then I tried it on a device that does not have Fb installed, and it worked. When I installed Fb on the device, it did not send or delete it again, it works fine. I assume that the Facebook application is blocking my application from using the SDK? The approach that I use more or less corresponds to this → http://blog.doityourselfandroid.com/2011/02/28/30-minute-guide-integrating-facebook-android-application/ but I get the same with others approaches.

I see that there is a problem with reading this → Post to a user’s facebook wall that does not work when the Facebook application is installed on the device / emulator but what should I do to solve this problem? I do not want my users to have to delete Fb, of course! Has anyone come to the same situation and managed to solve it?

+6
source share
3 answers

Minor code changes (facebook package)

Take a look at the authorize function in facebook.java file. try comment exit singlesignon and use startdialog () only ... something like this .. hope this helps.

+4
source

I had the same problem and had to disable SSO so that it could work.

+2
source

The above answer given by Raja is perfect.

that’s what I did and worked great ... it used to be difficult for me to figure out what to do exactly ...

so this is what i did ... hope it can help others

 // Prefer single sign-on, where available. // if (activityCode >= 0) { // singleSignOnStarted = startSingleSignOn(activity, mAppId, // permissions, activityCode); // } // Otherwise fall back to traditional dialog. 
0
source

Source: https://habr.com/ru/post/904739/


All Articles