1

I'm trying to make invite friends dialog using Unity Facebook sdk:s FB.AppRequest() call. Apprequest itself works fine and recipient gets the notification. If game is not installed on device it opens request to browser instead of google play store.

However if user has the game installed, notification leads correctly to game. Game can be found from facebook AppCenter and opens correct play store link from there.

a) Am I misunderstood that notification should open play store if game is not installed?

b)Is there place for play store url somewhere (I guess not while Facebook settings can lookup playstore images correctly)

c)Should it be submitted to Facebook Appcenter?

Game is published to play store and it is not sandboxed in facebook.

Current settings

Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.tuokio.smashtheschool"
    android:versionCode="5"
    android:versionName="0.4">
    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>

    <application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:debuggable="true">

        <activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape"
                  android:launchMode="singleTask"
                  android:label="@string/app_name"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
        </activity>

        <activity android:name="com.unity3d.player.VideoPlayer"
                  android:label="@string/app_name"
                  android:screenOrientation="landscape"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
        </activity>

        <!---REMOVED NON RELATED ACTIVITIES 


        -->

        <!-- FB -->
         <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
        </activity>
        <activity android:name="com.facebook.LoginActivity" android:screenOrientation="sensorLandscape" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
        </activity>
        <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true">
        </activity>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 1378812695724198" />


    </application>

    <!-- PERMISSIONS -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="com.android.vending.BILLING" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- PLEASE NOTE: Using this permission changes Application.persistentDataPath to always return external storage path! android.permission.WRITE_EXTERNAL_STORAGE -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- Must add the GET_ACCOUNTS and USE_CREDENTIALS perimissions to support Google auth -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-permission android:name="android.permission.GET_TASKS"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <uses-feature android:glEsVersion="0x00020000" />
    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="17" />

</manifest>

Facebook settings Basic settings Advanced settings Migrations Platforms permissions Unity settings

Thanks for advance!

Samhay
  • 248
  • 2
  • 8
  • Do you have Single Sign On & Deep Linking enabled on the game settings on Facebook? I was having a similar issue and that solved it – Gaston Claret May 10 '14 at 14:47
  • Both are enabled. Notification even works correctly if game is installed (opens game). Only if receiver has not installed game it tries to redirect to browser instead of play store. – Samhay May 10 '14 at 18:32
  • Do you have this in your manifest for Android? – Gaston Claret May 10 '14 at 19:30
  • Seems to be also correctly declared in manifest. We have published game in play store in limited countries. However we have not limited countries in facebook appsettings. Could that cause issues opening the store? – Samhay May 11 '14 at 09:25
  • I dont think that should be a problem. The only thing i can think of that could be wrong is that the package name in your Facebook seetings page does not match the one in the facebook settings inside unity – Gaston Claret May 11 '14 at 14:12
  • I double checked package name is correct. Seems that I have not included all information available. Notification leads to "Sorry, this page isn't available The link you followed may be broken, or the page may have been removed." if user tapped the popup from android notifications page opens inside android facebook app, if clicked inside facebook app notifications it tries to open same page in browser. I will update question later today and add more details about settings in facebook. – Samhay May 12 '14 at 07:43
  • Please do, post a screenshot of your settings page if you can (both Android & web), because I had the EXACT same issue, and it was a configuration problem (if you can, also the manifest) – Gaston Claret May 12 '14 at 22:31
  • I add images to the question – Samhay May 13 '14 at 12:38
  • Original question updated. – Samhay May 13 '14 at 13:11
  • @Samhay did you eventually solve it? if so, how? Thanks! – SuperFrog May 27 '14 at 12:43
  • Not yet. I have been busy in other tasks for a while and will return to this issue in few days with full atenttion. – Samhay May 29 '14 at 08:12

1 Answers1

1

I don't know if you're still searching for an answer but I think your question about submission to Facebook App Center was right.

I was having the same problem and my app wasn't submitted to Facebook as I was only using "standard" permissions (public_profile & user_friends doesn't require Facebook review). I thought that maybe submitting the app for review (only the "App Details" part) may help so I tested a simple request just before submitting and it still wasn't working. I submitted my app to Facebook (just the "App Details" part) in order to be listed in the App Center. Just after review and that my app has been accepted, I ran again a simple request and now everything seems to be working just fine. An app request opened on Android launch the Play Store if the app isn't installed or directly launch the app otherwise.

I can't say if it's a general rule because I can't find any documentation that support this idea but for me that makes sense (as the app is not listed on the app center and the Facebook app on the device cannot find any information about your application).

Hope this helps.

rferrez
  • 26
  • 4
  • Submission worked for me also. Actually our review was succesful few days before your answer and after that request started opening correctly to store. I was not so sure if it was the submission (there might be other changes I made also), but your answer seems to verify the submission to be the trick that did it. Thanks!! – Samhay Sep 08 '14 at 04:51