title: Facebook deep link opens Google Play instead of app (even when installed)
body: <p>I'm trying to use Facebook's new <a href="https://developers.facebook.com/docs/ads-for-apps/mobile-app-ads-engagement/" rel="nofollow noreferrer">Mobile App Engagement</a> for android, but I can't figure out why entering the ad takes me to my App's install page at Google Play, instead of opening my own app so I can handle the intent...</p>
  
  <p>Here is what I've made so far:</p>
  
  <p>1) At the "Native Android App" section (on App Basics Page), enabled "Deep Linking". The Key Hashes look ok, and Login with Facebook in my app works fine.</p>
  
  <p>2) Created an engagement ad with Power Editor, and passed "myapp://type/id" as Deep Link</p>
  
  <p>3) Added the following intent-filter to my app's main activity:</p>
  
  <pre><code>&lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.VIEW"/&gt;
              &lt;category android:name="android.intent.category.DEFAULT"/&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  
  <p>I've also tried other filters, like Dan's answer <a href="https://stackoverflow.com/questions/16195889/facebook-deep-linking-on-android">here</a></p>
  
  <p>4) Clicked on the ad on my FB feed... At this step, I get the following at logcat, if using signed app (generated apk or downloaded from Play):</p>
  
  <pre><code>11-19 16:06:57.540: INFO/ActivityManager(446): START u0 {act=android.intent.action.VIEW dat=market://details?id=br.com.myapp flg=0x10000000 cmp=com.android.vending/com.google.android.finsky.activities.LaunchUrlHandlerActivity (has extras)} from pid 14923
  </code></pre>
  
  <p>If I enter the ad with my app installed from IDE (IntelliJ), than I get the log below:   </p>
  
  <pre><code>11-19 16:10:30.845: INFO/ActivityManager(446): START u0 {act=android.intent.action.VIEW dat=market://details?id=br.com.myapp flg=0x10000000 cmp=com.android.vending/com.google.android.finsky.activities.LaunchUrlHandlerActivity (has extras)} from pid 14923
  11-19 16:10:31.055: DEBUG/Finsky(16198): [1] AppActionAnalyzer.&lt;init&gt;: br.com.myapp is installed but certificate mistmatch
  11-19 16:10:31.085: DEBUG/Finsky(16198): [1] DetailsDataBasedFragment.rebindViews: Page [class=DetailsFragment] loaded in [2947727 ms] (hasDetailsDataLoaded? false)
  11-19 16:10:31.185: DEBUG/Finsky(16198): [1] AppActionAnalyzer.&lt;init&gt;: br.com.myapp is installed but certificate mistmatch
  11-19 16:10:31.255: DEBUG/Finsky(16198): [1] DetailsDataBasedFragment.rebindViews: Page [class=DetailsFragment] loaded in [2947898 ms] (hasDetailsDataLoaded? true)
  </code></pre>
  
  <p>In both scenarios, Google Play is opened instead of my app. Seems like FB app is sending an Intent directly to market, passing my app's id, instead of following the activity class specified at App's dashboard. With IDE-installed APP, looks like I can't even receive anything from FB due to certificate problems...</p>
  
  <p>So what am I doing wrong that makes FB not sending an Intent adressed to my App? And how can I link my debug certificate to my FB App, avoiding this certificate mismatch error?
  Thanks in advance for helping!</p>