Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting facebook deeplinks to work on emulator facebook android

The problem I'm trying to solve- I'm trying to get deep linking working, and testing it with Emulator. When clicking on posts, the links direct to the mobile web site. This is in the case of the user having permissions for the app, and the app is installed (on the emulator). In the Facebook app, it even acknowledges its out of date, but an upgrade (in app) crashes.

I also noticed that the Facebook app installed on the emulator is out of date (I installed it via adb install facebook.apk from github sdk).

SSO is working fine, and I have setup deeplinking effectively with iOS before (So I know how ti's supposed to work/test it, etc.). But the port to Android is being held back by this out of date 3rd party Facebook app. I'm assuming testing on device will solve it, because there the Facebook app will be the latest (which brings to mind- what if people haven't updated their android facebook app?).

My app settings: facebook app settings

I'd post code, but this seems to be pure integration and configuration issues.

Note: my app isn't published on Google Play, could that be the issue? Also: maybe this is only testable on the device? My device is "in the mail" so trying to get this done with emulator as much as i can.

Update: Facebook told me that this requires the Facebook app 1.9.* which is not in the SDK. So, I got my hands on a device, and while I haven't solved it, at least the app bookmark functionality is working. Will update if/when I find the answer.

Update 11am: I finally got it to work!

  1. I had to publish my app in the Play/Market.
  2. Each time I tested, log out of FB-Android app, clear cache, and force stop. Acc. to the documentation the bookmarks are cached. I also think the facebook app-syncing occurs on launch, and never again. So if you change anything in FB's app settings, you need to log out/clear cache/stop for it to take in the fb android app.
  3. Only one key worked, even though it says "hash" in the fb app settings, I think my dev key was screwing things up. Double-confirm that your release key is the same as the one listed in app settings.
  4. The final secret sauce for me, was to turn off SSO and deeplinking, re-test without anything set. Also, remove dev package from phone and download from Play. (see: key mixups). then, I stepped back through the configurations by first turning on SSO, testing, then turning on the native deep linking.
  5. Only works on real device, not emulator (unless you can get 1.9 installed on emulator, may work, did not go down that route to test)
  6. Not sure if this matters, but it may: install app from Store/Play, not from Eclipse. Could be the key syncing thing.
like image 553
Anna Billstrom Avatar asked May 18 '12 20:05

Anna Billstrom


1 Answers

I figured it out- involved doing the following:

  1. I had to publish my app in the Play/Market.

  2. Each time I tested, log out of FB-Android app, clear cache, and force stop. Acc. to the documentation the bookmarks are cached. I also think the facebook app-syncing occurs on launch, and never again. So if you change anything in FB's app settings, you need to log out/clear cache/stop for it to take in the fb android app.

  3. Only one key worked, even though it says "hash" in the fb app settings, I think my dev key was screwing things up. Double-confirm that your release key is the same as the one listed in app settings.

  4. The final secret sauce for me, was to turn off SSO and deeplinking, re-test without anything set. Also, remove dev package from phone and download from Play. (see: key mixups). then, I stepped back through the configurations by first turning on SSO, testing, then turning on the native deep linking.

  5. Only works on real device, not emulator (unless you can get 1.9 installed on emulator, may work, did not go down that route to test)

  6. Not sure if this matters, but it may: install app from Store/Play, not from Eclipse. Could be the key syncing thing.

like image 72
Anna Billstrom Avatar answered Oct 07 '22 21:10

Anna Billstrom